zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: Zsh Users <zsh-users@zsh.org>, Zach Riggle <zachriggle@gmail.com>
Subject: Re: Global Aliases, but as a function?
Date: Mon, 20 Dec 2021 12:04:51 -0800	[thread overview]
Message-ID: <CAH+w=7b9mxK5ViRqLAgGjjV-xcqUx5UAM6XDkVJwSYhNuk4SqQ@mail.gmail.com> (raw)
In-Reply-To: <64ee9965-6517-481f-9fb5-683bd48cf220@www.fastmail.com>

On Mon, Dec 20, 2021 at 10:42 AM Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
>
> One could have preexec() install wrapper functions that shadow the
> command words of any simple command that has a «--help» argument.

Yes, this is another possible approach.  Such a function would then
have to uninstall itself again ... that gets a bit messy if there
might be other wrappers.  The conditions for whether to install the
wrapper would be similar to those implied for the zle-line-finish
hook.

Personally I'm curious what the necessary command-agnostic
help-coloring pager might be.


  reply	other threads:[~2021-12-20 20:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-18 10:38 Zach Riggle
2021-12-18 22:40 ` Bart Schaefer
2021-12-20 18:42   ` Daniel Shahaf
2021-12-20 20:04     ` Bart Schaefer [this message]
2021-12-20 20:11       ` Roman Perepelitsa
2021-12-20 20:24         ` Bart Schaefer
2021-12-21  0:57           ` Zach Riggle
2021-12-21  0:56     ` Zach Riggle
2021-12-21  1:55       ` Bart Schaefer
2021-12-22 20:14         ` 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='CAH+w=7b9mxK5ViRqLAgGjjV-xcqUx5UAM6XDkVJwSYhNuk4SqQ@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=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).