diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2000-07-02 17:21:54 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2000-07-02 17:21:54 +0000 |
commit | 4ed8c26c50dea84a01903e6d80b68701d9c4f3c0 (patch) | |
tree | c35b85c5cf130f31c96cb8d33191ddbe5f696ade /Completion/Core/_expand | |
parent | 0f398e9d2fd4f653cf24456bf4fbb4ce277f98e7 (diff) | |
download | zsh-4ed8c26c50dea84a01903e6d80b68701d9c4f3c0.tar.gz zsh-4ed8c26c50dea84a01903e6d80b68701d9c4f3c0.tar.xz zsh-4ed8c26c50dea84a01903e6d80b68701d9c4f3c0.zip |
12133: Protect completion system from stray error output and assorted fatal
errors when expanding strings taken from the command line.
Diffstat (limited to 'Completion/Core/_expand')
-rw-r--r-- | Completion/Core/_expand | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Completion/Core/_expand b/Completion/Core/_expand index 77d9c8794..5ac196428 100644 --- a/Completion/Core/_expand +++ b/Completion/Core/_expand @@ -63,7 +63,7 @@ if [[ "$force" = *s* ]] || eval exp\=\( ${${(q)exp}:gs/\\{/\{/:gs/\\}/\}/} \) exp=( ${${(e)exp//\\[ ]/ }//(#b)([ -])/\\$match[1]} ) +])/\\$match[1]} ) 2>/dev/null else exp=( ${exp:s/\\\$/\$} ) fi @@ -77,7 +77,7 @@ subd=("$exp[@]") # Now try globbing. [[ "$force" = *g* ]] || zstyle -T ":completion:${curcontext}:" glob && - exp=( ${~exp} ) + eval 'exp=( ${~exp} )' 2>/dev/null # If we don't have any expansions or only one and that is the same # as the original string, we let other completers run. |