diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-05-08 08:46:59 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-05-08 08:46:59 +0000 |
commit | ff82191c260160637ba67f0b4ecd4dd46778f53c (patch) | |
tree | 48431607a1dfb945f5691f81136d8cc29b520278 /Completion | |
parent | a3e01003c86ba324fc10871b14092db37a41df03 (diff) | |
download | zsh-ff82191c260160637ba67f0b4ecd4dd46778f53c.tar.gz zsh-ff82191c260160637ba67f0b4ecd4dd46778f53c.tar.xz zsh-ff82191c260160637ba67f0b4ecd4dd46778f53c.zip |
empty description means: don't add a -X option (14252)
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Base/Core/_description | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Completion/Base/Core/_description b/Completion/Base/Core/_description index 2c4232ade..6b4cadfe8 100644 --- a/Completion/Base/Core/_description +++ b/Completion/Base/Core/_description @@ -9,7 +9,8 @@ if [[ "$1" = -([12]|)[VJ] ]]; then shift fi -_lastdescr=( "$_lastdescr[@]" "$3" ) +3="${${3##[[:blank:]]#}%%[[:blank:]]#}" +[[ -n "$3" ]] && _lastdescr=( "$_lastdescr[@]" "$3" ) zstyle -s ":completion:${curcontext}:$1" group-name gname && [[ -z "$gname" ]] && gname="$1" @@ -51,7 +52,11 @@ else fi shift 2 -[[ -n "$format" ]] && zformat -f format "$format" "d:$1" "${(@)argv[2,-1]}" +if [[ -z "$1" && $# -eq 1 ]]; then + format= +elif [[ -n "$format" ]]; then + zformat -f format "$format" "d:$1" "${(@)argv[2,-1]}" +fi if [[ -n "$gname" ]]; then if [[ -n "$format" ]]; then |