Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Is there a way to do an automatic list-choices after successful completion of directory name?
- X-seq: zsh-users 10503
- From: "Nikolai Weibull" <now@xxxxxxxx>
- To: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Is there a way to do an automatic list-choices after successful completion of directory name?
- Date: Sun, 9 Jul 2006 20:03:59 +0200
- Cc: "Zsh Users' List" <zsh-users@xxxxxxxxxx>
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=T07KP4EYVGiX7Ma6qRTu/lZC0LYPwfJ7ifYkYRDotoBw+edzleca3m/INGLHS13HbutXrErVP00W36nbwSo/IbmvVsMfQUtiN28JdJfGv6hX46Md30ncpuXSwktEW6+ftVMoLyj32aFO9QpI84cyvrHtuapQpBwVVKs3MLYIzE0=
- In-reply-to: <060709102815.ZM10543@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <dbfc82860607071129u27fff7e2l827d3e2bc62fbfd1@xxxxxxxxxxxxxx> <dbfc82860607090836g299ae3c4g78250770a845d399@xxxxxxxxxxxxxx> <060709102815.ZM10543@xxxxxxxxxxxxxxxxxxxxxx>
- Sender: nikolai.weibull@xxxxxxxxx
On 7/9/06, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
On Jul 9, 8:37am, Nikolai Weibull wrote:
} Comments?
That technique only works in combination with this (or a similar) zstyle:
zstyle :completion::complete:cd:: tag-order \
local-directories path-directories
This fixes that, and also makes it work when completing files:
_expand-or-complete-with-list-choices-after-local-directories () {
zle expand-or-complete
if [[ $_lastcomp[tags] == ' '*(directories|files)' ' && $BUFFER[-1]
== '/' ]]; then
zle list-choices
fi
}
By the way, why is there a leading and trailing space in $_lastcomp[tags]?
nikolai
Messages sorted by:
Reverse Date,
Date,
Thread,
Author