diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2002-01-22 10:22:47 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2002-01-22 10:22:47 +0000 |
commit | 3807c902a23ea8b8e673103dff49d3d27a551756 (patch) | |
tree | 86b980265165cb7dd5d2710c936cb1c1a1c8fccf /Completion/Base/Core/_description | |
parent | f463b09b133f8c798750334558b99d633c1a2219 (diff) | |
download | zsh-3807c902a23ea8b8e673103dff49d3d27a551756.tar.gz zsh-3807c902a23ea8b8e673103dff49d3d27a551756.tar.xz zsh-3807c902a23ea8b8e673103dff49d3d27a551756.zip |
add new generic fake style and changes to the C-code for that (different implementation of compadd -x) (16483)
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 |