diff options
Diffstat (limited to 'Completion/Base/Core/_description')
-rw-r--r-- | Completion/Base/Core/_description | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Completion/Base/Core/_description b/Completion/Base/Core/_description index 6b4cadfe8..30e6dfa9b 100644 --- a/Completion/Base/Core/_description +++ b/Completion/Base/Core/_description @@ -1,6 +1,6 @@ #autoload -local name gropt=-J format gname hidden hide match opts +local name gropt=-J format gname hidden hide match opts tag opts=() @@ -51,6 +51,8 @@ else _comp_ignore=() fi +tag="$1" + shift 2 if [[ -z "$1" && $# -eq 1 ]]; then format= @@ -72,4 +74,15 @@ else fi fi +if ! (( ${funcstack[2,-1][(I)_description]} )) && + zstyle -a ":completion:${curcontext}:$tag" fake match; then + + local descr + + descr=( "${(@M)match:#*[^\\]:*}" ) + + compadd "${(@P)name}" - "${(@)${(@)match:#*[^\\]:*}:s/\\:/:/}" + (( $#descr )) && _describe -t "$tag" '' descr "${(@P)name}" +fi + return 0 |