mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-05-27 18:36:05 +02:00
49520: document $_args_chache_cmd
This commit is contained in:
parent
c7a391fa05
commit
b4c8aee52d
|
@ -1,5 +1,7 @@
|
||||||
2021-10-24 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
2021-10-24 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
||||||
|
|
||||||
|
* 49520: Etc/completion-style-guide: document $_args_cache_cmd
|
||||||
|
|
||||||
* 49493: Completion/Base/Utility/_arguments: fix handling of
|
* 49493: Completion/Base/Utility/_arguments: fix handling of
|
||||||
optional argument of long option in help text
|
optional argument of long option in help text
|
||||||
|
|
||||||
|
|
|
@ -570,3 +570,13 @@ Misc. remarks
|
||||||
data derived from another command's output to the helper. Consider
|
data derived from another command's output to the helper. Consider
|
||||||
using some variation of the `q` expansion flag to deal with this:
|
using some variation of the `q` expansion flag to deal with this:
|
||||||
`_call_program vals $words[1] ${(q-)myfile}'
|
`_call_program vals $words[1] ${(q-)myfile}'
|
||||||
|
10) If you are going to create a new completion function '_cmd' for a
|
||||||
|
command 'cmd', and if the 'cmd' supports the --help option, then you
|
||||||
|
may try
|
||||||
|
compdef _gnu_generic cmd
|
||||||
|
cmd -<TAB>
|
||||||
|
_gnu_generic may not work sufficiently well for 'cmd', but the specs
|
||||||
|
for _arguments generated from the help text are cached in a variable
|
||||||
|
'_args_cache_cmd', and you can save them in a file '_cmd' by
|
||||||
|
print -r -- ${(F)${(@qqq)_args_cache_cmd}} > _cmd
|
||||||
|
and use the file as a draft of the new completion function.
|
||||||
|
|
Loading…
Reference in New Issue