zsh-workers
 help / color / mirror / code / Atom feed
* How about separating "_arguments --" into a new function?
@ 2021-10-08 16:12 Jun. T
  2021-10-12 16:04 ` Daniel Shahaf
  0 siblings, 1 reply; 8+ messages in thread
From: Jun. T @ 2021-10-08 16:12 UTC (permalink / raw)
  To: zsh-workers

Not sure this was discussed before or not:

_gnu_generic works rather well for basenc, and '_arguments --'
caches the option specs generated from the --help text in a variable
_args_cache_basenc. So I created _basenc by

% compdef _gnu_generic basenc
% basenc <TAB>
% echo ${(F)${(qqq)_args_cache_basenc}} > _basenc
and edited _basenc (to add option groups etc.).

If we separate the part of _arguments that generates the option specs
(around lines 36 - 323) into an auto-loadable function, say help2specs,
then we will be able to do something like

% help2specs cmd > _cmd
(and edit _cmd to improve it)

If this seems useful I'll work on it.
Or just using $_args_cache_cmd is enough?

If _arguments is separated into two, tracing the history by 'git blame'
etc. would be a little bit tedious.



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-10-25 19:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08 16:12 How about separating "_arguments --" into a new function? Jun. T
2021-10-12 16:04 ` Daniel Shahaf
2021-10-14 10:58   ` Jun T
2021-10-17 16:49     ` Daniel Shahaf
2021-10-18  4:40       ` Jun T
2021-10-21 14:15         ` Daniel Shahaf
2021-10-24  9:53           ` Jun. T
2021-10-25 19:46             ` Daniel Shahaf

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).