Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: old or new style completion?
- X-seq: zsh-users 11902
- From: Atom Smasher <atom@xxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: old or new style completion?
- Date: Sun, 30 Sep 2007 04:06:06 +1200 (NZST)
- In-reply-to: <20070929153834.GA665@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Openpgp: id=0xB88D52E4D9F57808; algo=1 (RSA); size=4096; url=http://atom.smasher.org/pgp.txt
- References: <20070929113631.33362.qmail@xxxxxxxxxxx> <20070929122144.GC7515@xxxxxxxxxxxxxxx> <20070929153052.60598.qmail@xxxxxxxxxxx> <20070929153834.GA665@xxxxxxxxxxx>
On Sat, 29 Sep 2007, Clint Adams wrote:
2) whether i declare "cpv" as an alias or a function, the completion
system "interprets it" as the command is rsync, not cpv. if there's no
way around that it seems like a problem with the completion system...
no?
You are incorrect. Try cpv() { rsync "$@" }
You will not get rsync completion unless you do a "compdef _rsync cpv".
You could demand cp-like completion instead with "compdef _cp cpv",
though that would not be useful. If you are witnessing different
results, perhaps you still have your alias set.
=====================
yeah, i still had the alias defined; now it works fine as a function.
since cpv is rsync, but neutered to the point of only copying to/from the
local system i wouldn't want "compdef _rsync cpv", and i'm not even sure i
need "compdef _cp cpv", since the default of auto-completing directories
and files seems to work fine.
--
...atom
________________________
http://atom.smasher.org/
762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
-------------------------------------------------
"Facts are stupid things."
-- Ronald Reagan (1988)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author