diff options
| author | Peter Stephenson <pws@users.sourceforge.net> | 2011-03-29 08:46:56 +0000 |
|---|---|---|
| committer | Peter Stephenson <pws@users.sourceforge.net> | 2011-03-29 08:46:56 +0000 |
| commit | 35004b546d20244ba560d0d2471a9760802ab0fa (patch) | |
| tree | 36d71cb67684b3f667c9cca6667e9ce10aeed1d0 /Completion/compinit | |
| parent | 28926: No newline after the last line in listlist() when printing the list (diff) | |
| download | zsh-35004b546d20244ba560d0d2471a9760802ab0fa.tar zsh-35004b546d20244ba560d0d2471a9760802ab0fa.tar.gz zsh-35004b546d20244ba560d0d2471a9760802ab0fa.tar.bz2 zsh-35004b546d20244ba560d0d2471a9760802ab0fa.tar.lz zsh-35004b546d20244ba560d0d2471a9760802ab0fa.tar.xz zsh-35004b546d20244ba560d0d2471a9760802ab0fa.tar.zst zsh-35004b546d20244ba560d0d2471a9760802ab0fa.zip | |
Mikael: 28948: compdef -e overrides interpretation of argument as service
Diffstat (limited to 'Completion/compinit')
| -rw-r--r-- | Completion/compinit | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Completion/compinit b/Completion/compinit index aa42a12de..fc3625fc7 100644 --- a/Completion/compinit +++ b/Completion/compinit @@ -229,7 +229,7 @@ comppostfuncs=() # delete the definitions for the command names `bar' and `baz' compdef() { - local opt autol type func delete new i ret=0 cmd svc + local opt autol type func delete eval new i ret=0 cmd svc local -a match mbegin mend emulate -L zsh @@ -242,7 +242,7 @@ compdef() { return 1 fi - while getopts "anpPkKd" opt; do + while getopts "anpPkKde" opt; do case "$opt" in a) autol=yes;; n) new=yes;; @@ -263,6 +263,7 @@ compdef() { fi ;; d) delete=yes;; + e) eval=yes;; esac done shift OPTIND-1 @@ -276,7 +277,7 @@ compdef() { # If the first word contains an equal sign, all words must contain one # and we define which services to use for the commands. - if [[ "$1" = *\=* ]]; then + if [[ -z "$eval" ]] && [[ "$1" = *\=* ]]; then while (( $# )); do if [[ "$1" = *\=* ]]; then cmd="${1%%\=*}" |
