zsh-users
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Zach Riggle <zachriggle@gmail.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: Zsh Rosetta Stone / ExplainShell equivalent
Date: Wed, 1 Dec 2021 05:22:47 +0000	[thread overview]
Message-ID: <20211201052247.GC26421@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <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


  reply	other threads:[~2021-12-01  5:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-24  2:58 Zach Riggle
2021-12-01  5:22 ` Daniel Shahaf [this message]
2021-12-01 17:26 ` zzapper
2021-12-01 18:40   ` Bart Schaefer
2021-12-01 18:52     ` david rayner
2021-12-01 19:38       ` Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211201052247.GC26421@tarpaulin.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=zachriggle@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).