zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: dominik.vogt@gmx.de, zsh-users@zsh.org
Subject: Re: time command with shell builtins
Date: Tue, 24 Jan 2023 15:36:51 -0800	[thread overview]
Message-ID: <CAH+w=7Z3Srhc02WEmBv_m6YiGUm4mPw2oxNqfTAcm6kqm+GE=w@mail.gmail.com> (raw)
In-Reply-To: <Y9BlzD/hb4bwHAmb@localhost>

On Tue, Jan 24, 2023 at 3:14 PM Dominik Vogt <dominik.vogt@gmx.de> wrote:
>
> As far as I understand there's no reliable access to
> which command is being executed in preexec.

There's reliable access to what the user typed and to what that
expands to after alias replacement.  What else would you be looking
for?

preexec
     Executed just after a command has been read and is about to be
     executed.  If the history mechanism is active (regardless of
     whether the line was discarded from the history buffer), the string
     that the user typed is passed as the first argument, otherwise it
     is an empty string.  The actual command that will be executed
     (including expanded aliases) is passed in two different forms: the
     second argument is a single-line, size-limited version of the
     command (with things like function bodies elided); the third
     argument contains the full text that is being executed.


  reply	other threads:[~2023-01-24 23:37 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-23 13:40 Dominik Vogt
2023-01-23 13:42 ` Roman Perepelitsa
2023-01-23 14:17   ` zeurkous
2023-01-23 14:23     ` Roman Perepelitsa
2023-01-23 14:40       ` zeurkous
2023-01-23 14:28   ` Dominik Vogt
2023-01-23 14:46     ` zeurkous
2023-01-23 16:31     ` Bart Schaefer
2023-01-23 18:31     ` Mikael Magnusson
2023-01-23 18:49       ` Dominik Vogt
2023-01-24  9:32         ` Mikael Magnusson
2023-01-24 10:48           ` Dominik Vogt
2023-01-24 23:12             ` Dominik Vogt
2023-01-24 23:36               ` Bart Schaefer [this message]
     [not found]                 ` <Y9B7A8dWLiZNXKfW@localhost>
2023-01-26 16:23                   ` Dominik Vogt
2023-01-26 16:56                     ` Bart Schaefer
2023-01-26 17:26                       ` Dominik Vogt
2023-01-26 17:40                         ` Bart Schaefer
2023-02-02 18:10                     ` Dominik Vogt
2023-02-02 18:28                       ` Bart Schaefer
2023-02-02 19:15                         ` Dominik Vogt
2023-02-02 19:15                           ` Dominik Vogt
2023-02-02 19:31                           ` Bart Schaefer
2023-01-24 23:32             ` Bart Schaefer
2023-01-25  7:43               ` Mikael Magnusson
2023-01-25 12:58                 ` Dominik Vogt

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=7Z3Srhc02WEmBv_m6YiGUm4mPw2oxNqfTAcm6kqm+GE=w@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=dominik.vogt@gmx.de \
    --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).