Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Enabling tab-completion for an alias
- X-seq: zsh-users 12925
- From: Anonymous bin Ich <ichbinanon@xxxxxxxxx>
- Subject: Re: Enabling tab-completion for an alias
- Date: Sat, 14 Jun 2008 00:37:16 +0200
- Cc: zsh-users@xxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=kMTvcinDWyWvhAzNh/fV5KH7b7yV8VmgeOaVO+XGDsQ=; b=XCG/imMymUHSQOEWt+HoFMiOQz7aSsqIPMuvZhvEbrrNT8XjGiNcO3qqgtzD5Y27ma 56+FU7V5Ittb+VDHphLGJ7c5m2cntdja+izNi5tN4XhR5w85wX1WA9Rhz3lNBFcc1KCX I4p82/7Jf7FumRfW9GfwTaFuwp/pJ/8TkZf58=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=P1BgjAx9j84qBpjBnO6YCAxdhDeAMvIKnG/iSHU9xUinVCh0cFut1bfa2BwOLZ8lvI Y8hC6Hi4uP6oUHL4NS6uLCEcFw1L42KPcHbTJ7eqzq/ETo1uE6EoJ8EzI3kbPFYkqPfY c7F46DzJUHMntJ56tf2Ng3BBKnv6OWa18b2MM=
- In-reply-to: <237967ef0806131518l57c8d99fjc3736bb1173600b2@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <4852DD2F.6030908@xxxxxxxxxxx> <237967ef0806131352o7c1db7a6se47368ff4a0c90a8@xxxxxxxxxxxxxx> <4852E7D3.8080401@xxxxxxxxxxx> <237967ef0806131438x3214fbe6tdfb4d3d73f627e6b@xxxxxxxxxxxxxx> <4852ECEE.2070301@xxxxxxxxxxx> <237967ef0806131518l57c8d99fjc3736bb1173600b2@xxxxxxxxxxxxxx>
On Sat, 14 Jun 2008 00:18:19 +0200
"Mikael Magnusson" <mikachu@xxxxxxxxx> wrote:
> 2008/6/13 David Sveningsson <ext@xxxxxxxxxxx>:
> > Mikael Magnusson skrev:
> >>
> >> 2008/6/13 David Sveningsson <ext@xxxxxxxxxxx>:
> >>>
> >>> Mikael Magnusson skrev:
> >>>>
> >>>> 2008/6/13 David Sveningsson <ext@xxxxxxxxxxx>:
> >>>>>
> >>>>> Hi, I'm having some trouble with tab-completion. I've created
> >>>>> an alias for
> >>>>> svn (subversion) which runs a pythonscript executing svn. One
> >>>>> of the reasons
> >>>>> for this is that I use the script to colorize the output.
> >>>>>
> >>>>> However this caused zsh to stop tab-completing svn commands,
> >>>>> eg. I used to
> >>>>> be able to type "svn res[tab]" and it completes to "svn
> >>>>> resolved". Is there
> >>>>> a way to enable the same tab-completions for my alias?
> >>>>
> >>>> Assuming your alias is
> >>>> alias svn="myfoobarscript --blabla"
> >>>> then you can put in
> >>>> compdef _svn myfoobarscript=svn
> >>>> and it should complete the same as svn
> >>>>
> >>> Almost, it looks like
> >>> alias svn="python ~/bin/svnc.py"
> >>>
> >>> Is it possible anyway? Otherwise I guess I could always just wrap
> >>> that in a
> >>> shellscript.
> >>
> >> Easy solution is chmod +x ~/bin/svnc.py and change the alias to
> >> just the script.
> >>
> >>
> >
> > You're right, anyway, I could not use "compdef _svn
> > myfoobarscript=svn" but if I removed _svn it works. Thanks for your
> > help!
>
> Oh i guess the actual file is _subversion, not _svn, I didn't know you
> could give the foo=bar thing without specifying the completer :).
>
Actually, I use
compdef '_svn' myfoobarscript
and that works :)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author