diff options
Diffstat (limited to 'Completion/Base/_arguments')
-rw-r--r-- | Completion/Base/_arguments | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments index a5a39112a..4f33048e0 100644 --- a/Completion/Base/_arguments +++ b/Completion/Base/_arguments @@ -142,11 +142,16 @@ if (( long )); then cache=( "$cache[@]" "${(@)^tmpo}=${dir}${descr}" ) fi - # Everything else is just added as an option without arguments. + # Everything else is just added as an option without arguments or + # as described by $descr. if (( $#tmp )); then tmp=("${(@)tmp//[^a-zA-Z0-9-]}") - cache=( "$cache[@]" "$tmp[@]" ) + if [[ -n "$descr" ]]; then + cache=( "$cache[@]" "${(@)^tmp}${descr}" ) + else + cache=( "$cache[@]" "$tmp[@]" ) + fi fi done set -A "$name" "${(@)cache:# #}" |