diff options
| author | Bart Schaefer <barts@users.sourceforge.net> | 2011-05-04 23:31:39 +0000 |
|---|---|---|
| committer | Bart Schaefer <barts@users.sourceforge.net> | 2011-05-04 23:31:39 +0000 |
| commit | e880604f029088f32fb1ecc39213d720ae526aaa (patch) | |
| tree | 501c7f0883afb330be02b098917a42a1398a722b /Completion/bashcompinit | |
| parent | Rocky Bernstein: 29135 (plus tweaks): compgen -W in bash completion (diff) | |
| download | zsh-e880604f029088f32fb1ecc39213d720ae526aaa.tar zsh-e880604f029088f32fb1ecc39213d720ae526aaa.tar.gz zsh-e880604f029088f32fb1ecc39213d720ae526aaa.tar.bz2 zsh-e880604f029088f32fb1ecc39213d720ae526aaa.tar.lz zsh-e880604f029088f32fb1ecc39213d720ae526aaa.tar.xz zsh-e880604f029088f32fb1ecc39213d720ae526aaa.tar.zst zsh-e880604f029088f32fb1ecc39213d720ae526aaa.zip | |
29140: hide the "words" special variable so that it may be used as an
ordinary variable by bash completions.
Diffstat (limited to 'Completion/bashcompinit')
| -rw-r--r-- | Completion/bashcompinit | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Completion/bashcompinit b/Completion/bashcompinit index 2ccc94de9..63101a9c8 100644 --- a/Completion/bashcompinit +++ b/Completion/bashcompinit @@ -127,7 +127,13 @@ compgen() { ;; F) COMPREPLY=() - $OPTARG "${words[0]}" "${words[CURRENT-1]}" "${words[CURRENT-2]}" + (){ + set -- "${words[0]}" "${words[CURRENT-1]}" "${words[CURRENT-2]}" + # There may be more things we need to add to this typeset to + # protect bash functions from compsys special variable names + typeset -h words + $OPTARG "$@" + } results+=( "${COMPREPLY[@]}" ) ;; G) |
