1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-29 19:00:57 +02:00

small fix for _requested to be able to use _all_labels from within it (10910)

This commit is contained in:
Sven Wischnowsky 2000-04-25 11:00:06 +00:00
parent 6623bb41b9
commit 2f90974c38
4 changed files with 13 additions and 3 deletions

View file

@ -1,5 +1,9 @@
2000-04-25 Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
* 10910: Completion/Base/_tilde, Completion/Core/_all_labels,
Completion/Core/_requested: small fix for _requested to be able to
use _all_labels from within it
* 10909: Completion/Core/_expand, Src/Zle/compcore.c,
Src/Zle/compresult.c: report prefix/suffix of parameter expansion
in IPREFIX/ISUFFIX; make _expand use them to be able to expand $foo

View file

@ -18,6 +18,7 @@ _tags users named-directories directory-stack
while _tags; do
_requested users && _users "$suf[@]" "$@" && ret=0
_requested named-directories expl 'named directory' \
compadd "$suf[@]" "$@" - "${(@k)nameddirs}"

View file

@ -1,6 +1,11 @@
#autoload
local gopt=-J len tmp pre suf ret=1 descr spec
local gopt=-J len tmp pre suf ret=1 descr spec prev
if [[ "$1" = - ]]; then
prev=-
shift
fi
if [[ "$1" = -([12]|)[VJ] ]]; then
gopt="$1"
@ -20,7 +25,7 @@ else
suf=5
fi
while comptags -A "$1" curtag spec; do
while comptags "-A$prev" "$1" curtag spec; do
_comp_tags="$_comp_tags $spec "
if [[ "$curtag" = *:* ]]; then
zformat -f descr "${curtag#*:}" "d:$3"

View file

@ -9,7 +9,7 @@ fi
if comptags -R "$1"; then
if [[ $# -gt 3 ]]; then
_all_labels "$gopt" "$@"
_all_labels - "$gopt" "$@"
elif [[ $# -gt 1 ]]; then
_description "$gopt" "$@"
fi