diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2018-02-26 20:03:48 +0000 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2018-02-26 20:03:48 +0000 |
commit | ba7de6d0d52578d343a56b49083456ebf00dfb26 (patch) | |
tree | 3544dca4500520c4da7c4a6b2e832080366b3a81 /Completion/Base/Completer | |
parent | 557d1d7259229ee7dd762750f3bfbcd7412c8564 (diff) | |
download | zsh-ba7de6d0d52578d343a56b49083456ebf00dfb26.tar.gz zsh-ba7de6d0d52578d343a56b49083456ebf00dfb26.tar.xz zsh-ba7de6d0d52578d343a56b49083456ebf00dfb26.zip |
users/23169: only expand ~[...] under the same circumstances as other ~forms
Diffstat (limited to 'Completion/Base/Completer')
-rw-r--r-- | Completion/Base/Completer/_expand | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Completion/Base/Completer/_expand b/Completion/Base/Completer/_expand index a6e30e891..ee3681bad 100644 --- a/Completion/Base/Completer/_expand +++ b/Completion/Base/Completer/_expand @@ -43,7 +43,8 @@ zstyle -s ":completion:${curcontext}:" accept-exact tmp || if [[ "$tmp" != (yes|true|on|1) ]]; then { [[ "$word" = \~(|[-+]) || - ( "$word" = \~[-+][1-9]## && $word[3,-1] -le $#dirstack ) ]] && return 1 } + ( "$word" = \~[-+][1-9]## && $word[3,-1] -le $#dirstack ) || + $word = \~\[*\]/* ]] && return 1 } { [[ ( "$word" = \~* && ${#userdirs[(I)${word[2,-1]}*]}+${#nameddirs[(I)${word[2,-1]}*]} -gt 1 ) || ( "$word" = *\$[a-zA-Z0-9_]## && ${#parameters[(I)${word##*\$}*]} -ne 1 ) ]] && continue=1 } |