diff options
author | Barton E. Schaefer <schaefer@zsh.org> | 2015-10-11 21:23:38 -0700 |
---|---|---|
committer | Barton E. Schaefer <schaefer@zsh.org> | 2015-10-11 21:23:38 -0700 |
commit | ce929eb37e0a79d847dbfcaf1436c1a46bca55b2 (patch) | |
tree | 18d26cfe39ba127c44d2eb230bb0179e6d0d829b /Completion/Base | |
parent | d77bf2ba88c289e28139ce36ac767447113ab95d (diff) | |
download | zsh-ce929eb37e0a79d847dbfcaf1436c1a46bca55b2.tar.gz zsh-ce929eb37e0a79d847dbfcaf1436c1a46bca55b2.tar.xz zsh-ce929eb37e0a79d847dbfcaf1436c1a46bca55b2.zip |
36841: factor out and update the patterns that filter "uninteresting" functions out of the $funcstack display
Diffstat (limited to 'Completion/Base')
-rw-r--r-- | Completion/Base/Widget/_complete_help | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Completion/Base/Widget/_complete_help b/Completion/Base/Widget/_complete_help index 0563c618f..09637ecb9 100644 --- a/Completion/Base/Widget/_complete_help +++ b/Completion/Base/Widget/_complete_help @@ -6,12 +6,15 @@ _complete_help() { local _sort_tags=_help_sort_tags text i j k tmp typeset -A help_funcs help_tags help_sfuncs help_styles + local -H _help_scan_funcstack="main_complete|complete|approximate|normal" + local -H _help_filter_funcstack="alternative|call_function|describe|dispatch|wanted|requested|all_labels|next_label" + { compadd() { return 1 } zstyle() { - local _f="${${(@)${(@)funcstack[2,(i)_(main_complete|complete|approximate|normal)]}:#_(dispatch|wanted|requested|all_labels|next_label)}% *}" + local _f="${${(@)${(@)funcstack[2,(i)_($~_help_scan_funcstack)]}:#(_($~_help_filter_funcstack)|\((eval|anon)\))}% *}" - [[ -z "$_f" ]] && _f="${${(@)funcstack[2,(i)_(main_complete|complete|approximate|normal)]}:#_(dispatch|wanted|requested|all_labels|next_label)}" + [[ -z "$_f" ]] && _f="${${(@)funcstack[2,(i)_($~_help_scan_funcstack)]}:#(_($~_help_filter_funcstack)|\((eval|anon)\))}" if [[ "$help_sfuncs[$2]" != *${_f}* || "$help_styles[${2}${_f}]" != *${3}* ]]; then @@ -73,7 +76,7 @@ _complete_help() { } _help_sort_tags() { - local f="${${(@)${(@)funcstack[3,(i)_(main_complete|complete|approximate|normal)]}:#(_(dispatch|wanted|requested|all_labels|next_label)|\(eval\))}% *}" + local f="${${(@)${(@)funcstack[3,(i)_($~_help_scan_funcstack)]}:#(_($~_help_filter_funcstack)|\((eval|anon)\))}% *}" if [[ "$help_funcs[$curcontext]" != *${f}* || "$help_tags[${curcontext}${f}]" != *(${(j:|:)~argv})* ]]; then |