zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: Fwd: Re: %N in prompt shows "_zsh_highlight_call_widget" on Ctrl-L instead of e.g. "/usr/bin/zsh" or "-zsh" since recently (#414)
Date: Fri, 10 Feb 2017 09:59:49 -0800	[thread overview]
Message-ID: <170210095949.ZM9880@torch.brasslantern.com> (raw)
In-Reply-To: <20170207074826.GV27938@sym.noone.org>

On Feb 7,  8:48am, Axel Beckert wrote:
}
} Everytime I press Ctrl-L in my xterm, %N inside my prompt shows
} _zsh_highlight_call_widget instead of e.g. /usr/bin/zsh or -zsh

I'm not sure at which point this might have shown up -- possibly
after workers/38991 (commit f026a4dc) -- but I think it has to be
considered a bugfix, because _zsh_highlight_call_widget (or in the
other example the "clear-screen" widget) is what is being executed
at the time the prompt is recalculated.

Of course in this case you'd really like to know what's happening at
the time the prompt is displayed; %N is really intended for use in PS4
where the recalculation and the display occur together.  For PS1 that
only happens when the editor starts up for each new command input.

In what circumstances would you expect to need %N in PS1?  That is,
the reason to use any %-expando is to display information that will
change after the prompt is assigned.  If there is no case in which
you would expect %N to return something different, then you should
not need to use it.  Instead for example:

    PS1="$ZSH_ARGZERO:t %# "


  reply	other threads:[~2017-02-10 18:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07  7:48 Axel Beckert
2017-02-10 17:59 ` Bart Schaefer [this message]
2017-02-14 15:32   ` Axel Beckert
2017-02-14 16:18     ` Axel Beckert
2017-02-14 16:40       ` Bart Schaefer
2017-02-15 16:52         ` Axel Beckert

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=170210095949.ZM9880@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@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).