Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Zsh Rosetta Stone / ExplainShell equivalent
- X-seq: zsh-users 27407
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Zach Riggle <zachriggle@xxxxxxxxx>
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Zsh Rosetta Stone / ExplainShell equivalent
- Date: Wed, 1 Dec 2021 05:22:47 +0000
- Archived-at: <https://zsh.org/users/27407>
- In-reply-to: <CAMP9c5mEcn8z_sFLuvbzTUTqWEeATGcunVyOj=WXBC6rEmjWQw@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CAMP9c5mEcn8z_sFLuvbzTUTqWEeATGcunVyOj=WXBC6rEmjWQw@mail.gmail.com>
Zach Riggle wrote on Tue, Nov 23, 2021 at 20:58:52 -0600:
> $ ls -la *(.Dmm-3)
⋮
> Is there any interest in something like ExplainShell or ShellCheck for
> Zsh? I'm not sure what tools are best fit for parsing things like
> complicated expressions.
Truncating the command line after each character and doing headless
completions (https://github.com/Valodim/zsh-capture-completion) might be
a good start.
For --options to builtins you could potentially make it a lot smarter by
looking in the manual sources. Given «foo -x», jump to the
[a-z]index(foo) line, then show either the «item(tt(-x))», if there is
one, or the output of a sentence-wise grep for «tt(-x)» (taking the
parentheses as literals).
As to your question, you might've gotten better answers if you'd given
a self-contained description (or at least examples) of the proposed
functionality.
Cheers,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author