Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: which completion function are used for aliases?
- X-seq: zsh-users 10089
- From: Andy Spiegl <zsh.Andy@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: which completion function are used for aliases?
- Date: Sun, 26 Mar 2006 21:20:54 +0200
- In-reply-to: <060325103101.ZM21832@xxxxxxxxxxxxxxxxxxxxxx>
- Kinfo: virscan ok
- Kinfo: !spam auth
- Kreccount: 1
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20060325000835.GA31757@xxxxxxxxx> <060325103101.ZM21832@xxxxxxxxxxxxxxxxxxxxxx>
Hi Bart,
> Try "unsetopt complete_aliases".
Aaah, interesting! I guess I added this option a long time ago
and had forgotten about it, but the name of the option really is
a bit confusing. :-)
Now, is it also possible to make zsh "know" the options of the alias,
so that I don't have to hardcode the aliases in my completion function?
But how can I get the details of the defined aliases???
Right now, my completion function uses this code:
---------------
local dir=${words[(r)--dir=*]##--dir=}
if [[ -z $dir ]]; then
integer dirind=${words[(i)--dir]}
if (( dirind )); then
dir=$words[dirind+1]
fi
fi
# Default directories (depending on which alias is used)
if [[ -z $dir ]]; then
if [[ $words[1] = gigaset2 ]]; then
dir="/home/spiegl/movies/gigaset/PVR/"
elif [[ $words[1] = gigaset3 ]]; then
dir="/data2/movies/gigaset/PVR/"
elif [[ $words[1] = gigaset-ext ]]; then
dir="/extern-dos/Video/"
else
dir="/data/movies/gigaset/PVR/"
fi
fi
--------------
Thx,
Andy.
PS:
gigaset2='gigaset --dir /home/spiegl/movies/gigaset/PVR'
gigaset3='gigaset --dir /data2/movies/gigaset/PVR'
gigaset-ext='gigaset --dir /extern-dos/Video'
--
New Windows XP error message:
"File not found. Should I fake it? (Y/N)"
Messages sorted by:
Reverse Date,
Date,
Thread,
Author