zsh-users
 help / color / mirror / code / Atom feed
From: Zach Riggle <zachriggle@gmail.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Zsh Rosetta Stone / ExplainShell equivalent
Date: Tue, 23 Nov 2021 20:58:52 -0600	[thread overview]
Message-ID: <CAMP9c5mEcn8z_sFLuvbzTUTqWEeATGcunVyOj=WXBC6rEmjWQw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 961 bytes --]

Has anybody written a "zsh wtf" style tool where a complex expression is
annotated, similar to "explainshell.com"?

The more I learn about Zsh, the more obscure and hard-to-read my code is.

$ command date
Tue Nov 23 20:17:53 CST 2021


$ ls -la *(.Dmm-3)
-rw-r--r-- 1 zachriggle staff 0 Nov 23 20:17 file_10
-rw-r--r-- 1 zachriggle staff 0 Nov 23 20:15 file_8
-rw-r--r-- 1 zachriggle staff 0 Nov 23 20:16 file_9


Is definitely very convenient -- but only if you know what's going on.
Other, more documented commands can achieve roughly the same thing.


$ find . -Bmin -3 -type f -maxdepth 1 | xargs ls -la
-rw-r--r--  1 zachriggle  staff  0 Nov 23 20:17 ./file_10
-rw-r--r--  1 zachriggle  staff  0 Nov 23 20:15 ./file_8
-rw-r--r--  1 zachriggle  staff  0 Nov 23 20:16 ./file_9


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.

*Zach Riggle*

[-- Attachment #2: Type: text/html, Size: 2118 bytes --]

             reply	other threads:[~2021-11-24  2:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-24  2:58 Zach Riggle [this message]
2021-12-01  5:22 ` Daniel Shahaf
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='CAMP9c5mEcn8z_sFLuvbzTUTqWEeATGcunVyOj=WXBC6rEmjWQw@mail.gmail.com' \
    --to=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).