diff options
Diffstat (limited to 'Completion/Base')
-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 |