diff options
| author | Barton E. Schaefer <schaefer@zsh.org> | 2013-10-12 09:19:24 -0700 |
|---|---|---|
| committer | Barton E. Schaefer <schaefer@zsh.org> | 2013-10-12 09:19:24 -0700 |
| commit | d5ba3ed24579bb12df958c09224367e16e70bad2 (patch) | |
| tree | cfc1855ecdee02a0f7fa35d5c583c57e32013eef /Completion | |
| parent | Update ChangeLog with previous commits (diff) | |
| download | zsh-d5ba3ed24579bb12df958c09224367e16e70bad2.tar zsh-d5ba3ed24579bb12df958c09224367e16e70bad2.tar.gz zsh-d5ba3ed24579bb12df958c09224367e16e70bad2.tar.bz2 zsh-d5ba3ed24579bb12df958c09224367e16e70bad2.tar.lz zsh-d5ba3ed24579bb12df958c09224367e16e70bad2.tar.xz zsh-d5ba3ed24579bb12df958c09224367e16e70bad2.tar.zst zsh-d5ba3ed24579bb12df958c09224367e16e70bad2.zip | |
31818: fix completion for zsh in _sh, and document the _arguments behavior that made the fix necessary
To avoid side effects, reposition the _arguments call in _sh for the zsh
special case. Document the side effects so avoided, and clean up the
_arguments documentation a bit along the way.
Diffstat (limited to 'Completion')
| -rw-r--r-- | Completion/Unix/Command/_sh | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Completion/Unix/Command/_sh b/Completion/Unix/Command/_sh index 7258e4260..104c7576c 100644 --- a/Completion/Unix/Command/_sh +++ b/Completion/Unix/Command/_sh @@ -5,10 +5,7 @@ if [[ $service == zsh ]]; then if [[ ${words[CURRENT-1]} == -o ]]; then _options # no other possibilities - return 0 - fi - if _arguments -S -s -- '*:'; then - return 0 + return fi fi @@ -25,3 +22,9 @@ else fi _default fi + +local ret=$? + +[[ $service == zsh ]] && _arguments -S -s -- '*:' && ret=0 + +return ret |
