diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-04-03 12:56:31 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-04-03 12:56:31 +0000 |
commit | bd6aa28b26ee2ab109289775a21a6f6c3177adc0 (patch) | |
tree | a87842e8a94bbcd3cf235942e481befb61ffca6d | |
parent | b5019ef4e540008b9438b3cf4f06daa5f04d5bcc (diff) | |
download | zsh-bd6aa28b26ee2ab109289775a21a6f6c3177adc0.tar.gz zsh-bd6aa28b26ee2ab109289775a21a6f6c3177adc0.tar.xz zsh-bd6aa28b26ee2ab109289775a21a6f6c3177adc0.zip |
Make style-list optional
-rw-r--r-- | Completion/Commands/_complete_help | 25 | ||||
-rw-r--r-- | Doc/Zsh/compsys.yo | 9 |
2 files changed, 18 insertions, 16 deletions
diff --git a/Completion/Commands/_complete_help b/Completion/Commands/_complete_help index cfc922df5..13a230e6e 100644 --- a/Completion/Commands/_complete_help +++ b/Completion/Commands/_complete_help @@ -44,21 +44,22 @@ tags in context :completion:${i}:" text="${text}${tmp}" done - text="$text + if [[ ${NUMERIC:-1} -ne 1 ]]; then + text="$text " - for i in "${(@ok)help_sfuncs}"; do - text="${text} + for i in "${(@ok)help_sfuncs}"; do + text="${text} styles in context ${i}" - tmp=() - for j in "${(@s.:.)help_sfuncs[$i][2,-1]}"; do - tmp=( "$tmp[@]" "${(@s.,.)help_styles[${i}${j}][2,-1]}" ) - done - zformat -a tmp ' (' "$tmp[@]" - tmp=( ' + tmp=() + for j in "${(@s.:.)help_sfuncs[$i][2,-1]}"; do + tmp=( "$tmp[@]" "${(@s.,.)help_styles[${i}${j}][2,-1]}" ) + done + zformat -a tmp ' (' "$tmp[@]" + tmp=( ' '${^tmp}')' ) - text="${text}${tmp}" - done - + text="${text}${tmp}" + done + fi compstate[list]='list force' compstate[insert]='' diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index 35204a217..e65a0a692 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -355,8 +355,7 @@ ifzman(the section `Bindable Commands' below)\ ifnzman(noderef(Bindable Commands)) can be invoked to find out the context and tag names and styles used at a particular point in completion. It shows a list of context names and the -tag names used in those contexts and then a list of context names and -the styles used in those contexts if completion were tried at the +tag names used in those contexts if completion were tried at the current cursor position. Hence one can easily find out all the information needed to change the behaviour of the tt(tag-order) style for a particular context. @@ -2200,8 +2199,10 @@ read, call tt(_read_comp) with a numeric argument. findex(_complete_help (^Xh)) item(tt(_complete_help (^Xh)))( This widget displays information about the context names, -the tags, the styles, and the completion functions used -when completing at the current cursor position. +the tags, and the completion functions used +when completing at the current cursor position. If given a numeric +argument other than tt(1) (as in `tt(ESC-2 ^Xh)'), then the styles +used and the contexts for which they are used will be shown, too. Note that, depending on the control flow in the completion functions called, the information about the styles may be |