diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-10-10 15:06:30 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-10-10 15:06:30 +0000 |
commit | e1fb97ee440f41014bb621f588ac04011280ddbe (patch) | |
tree | 1d0bdb3291c419114ddedac827a41770b89fc9cb | |
parent | 7b35c8639c5d36cd06df35f432735b0aa29c08cf (diff) | |
download | zsh-e1fb97ee440f41014bb621f588ac04011280ddbe.tar.gz zsh-e1fb97ee440f41014bb621f588ac04011280ddbe.tar.xz zsh-e1fb97ee440f41014bb621f588ac04011280ddbe.zip |
follow-up to 12942, only a missing redirection (12948)
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Completion/Core/_expand | 28 |
2 files changed, 8 insertions, 23 deletions
diff --git a/ChangeLog b/ChangeLog index 01f4d59b2..7a297c3b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2000-10-10 Sven Wischnowsky <wischnow@zsh.org> + * 12948: Completion/Core/_expand: follow-up to 12942, only a + missing redirection + * 12946: Completion/Base/_math, Completion/Base/_subscript, Completion/Builtins/_vars, Completion/Builtins/_zstyle, Completion/Core/_parameters, Doc/Zsh/compsys.yo: add diff --git a/Completion/Core/_expand b/Completion/Core/_expand index eaa75fb23..f0e12cb99 100644 --- a/Completion/Core/_expand +++ b/Completion/Core/_expand @@ -12,7 +12,6 @@ setopt localoptions nonomatch [[ _matcher_num -gt 1 ]] && return 1 local exp word sort expr expl subd suf=" " force opt asp tmp opre pre epre -local gal (( $# )) && while getopts gsco opt; do @@ -49,12 +48,6 @@ zstyle -t ":completion:${curcontext}:" accept-exact || ( "$word" = *\$[a-zA-Z0-9_]## && ${#parameters[(I)${word##*\$}*]} -ne 1 ) ]] && return 1 } -# We have to temporarily remove the global aliases because they can make -# the evals fail. - -gal=( ${(kv)galiases} ) -(( $#gal )) && builtin unalias ${(k)galiases} - # In exp we will collect the expansions. exp=("$word") @@ -66,7 +59,7 @@ exp=("$word") if [[ "$force" = *s* ]] || zstyle -T ":completion:${curcontext}:" substitute; then [[ ! -o ignorebraces && "${#${exp}//[^\{]}" = "${#${exp}//[^\}]}" ]] && - eval exp\=\( ${${(q)exp}:gs/\\{/\{/:gs/\\}/\}/} \) + eval exp\=\( ${${(q)exp}:gs/\\{/\{/:gs/\\}/\}/} \) 2>/dev/null eval 'exp=( ${${(e)exp//\\[ ]/ }//(#b)([ ])/\\$match[1]} )' 2>/dev/null @@ -90,20 +83,14 @@ subd=("$exp[@]") (( $#exp )) || exp=("$subd[@]") -if [[ $#exp -eq 1 && "${exp[1]//\\}" = "${word//\\}"(|\(N\)) ]]; then - galiases=( $gal ) - return 1 -fi +[[ $#exp -eq 1 && "${exp[1]//\\}" = "${word//\\}"(|\(N\)) ]] && return 1 # With subst-globs-only we bail out if there were no glob expansions, # regardless of any substitutions -if { [[ "$force" = *o* ]] || - zstyle -t ":completion:${curcontext}:" subst-globs-only } && - [[ "$subd" = "$exp"(|\(N\)) ]]; then - galiases=( $gal ) - return 1 -fi +{ [[ "$force" = *o* ]] || + zstyle -t ":completion:${curcontext}:" subst-globs-only } && + [[ "$subd" = "$exp"(|\(N\)) ]] && return 1 zstyle -s ":completion:${curcontext}:" keep-prefix tmp || tmp=changed if [[ "$word" = [\~\$]*/* && "$tmp" = (yes|true|on|1|changed) ]]; then @@ -114,12 +101,7 @@ if [[ "$word" = [\~\$]*/* && "$tmp" = (yes|true|on|1|changed) ]]; then [[ "$tmp" != changed || $#exp -gt 1 || "${opre}${exp[1]#${pre}}" != "$word" ]] && exp=( ${opre}${^exp#${pre}} ) fi - - galiases=( $gal ) - [[ $#exp -eq 1 && "$exp[1]" = "$word" ]] && return 1 -else - galiases=( $gal ) fi # Now add as matches whatever the user requested. |