diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-03-27 12:22:53 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-03-27 12:22:53 +0000 |
commit | aa9c315cc872f86465a83dba3546ee62317297ba (patch) | |
tree | 4730b18268c7b3d5381c0a245054244cb41e46d8 /Completion/Base/_tilde | |
parent | 6d72dca54fbbf3e86807502288ace649f5fbe05c (diff) | |
download | zsh-aa9c315cc872f86465a83dba3546ee62317297ba.tar.gz zsh-aa9c315cc872f86465a83dba3546ee62317297ba.tar.xz zsh-aa9c315cc872f86465a83dba3546ee62317297ba.zip |
comment out looking up the prefix-needed style when completing directory stack entries; make _tilde use _popd, finally (13789)
Diffstat (limited to 'Completion/Base/_tilde')
-rw-r--r-- | Completion/Base/_tilde | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/Completion/Base/_tilde b/Completion/Base/_tilde index 43c9b3ea4..058d218c8 100644 --- a/Completion/Base/_tilde +++ b/Completion/Base/_tilde @@ -24,33 +24,7 @@ while _tags; do _requested named-directories expl 'named directory' \ compadd "$suf[@]" "$@" -k nameddirs - if _requested directory-stack && - { ! zstyle -T ":completion:${curcontext}:directory-stack" prefix-needed || - [[ "$PREFIX" = [-+]* || nm -eq compstate[nmatches] ]] }; then - if zstyle -T ":completion:${curcontext}:directory-stack" verbose; then - integer i - - lines=("${PWD}" "${dirstack[@]}") - - if [[ ( -prefix - && ! -o pushdminus ) || - ( -prefix + && -o pushdminus ) ]]; then - revlines=( $lines ) - for (( i = 1; i <= $#lines; i++ )); do - lines[$i]="$((i-1)) -- ${revlines[-$i]}" - done - else - for (( i = 1; i <= $#lines; i++ )); do - lines[$i]="$((i-1)) -- ${lines[$i]}" - done - fi - list=( ${PREFIX[1]}${^lines%% *} ) - disp=( -ld lines ) - else - list=( ${PREFIX[1]}{0..${#dirstack}} ) - disp=() - fi - _all_labels -V directory-stack expl 'directory stack' \ - compadd "$suf[@]" "$disp[@]" -Q -a list && ret=0 - fi + _requested directory-stack && _popd "$suf[@]" && ret=0 + (( ret )) || return 0 done |