Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
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)
- X-seq: zsh-workers 40517
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- 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
- Authentication-results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=brasslantern-com.20150623.gappssmtp.com
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=EhDl2IKA8UCsLbeF1yDOGsQlB3wykLg7idIPMVz8PBQ=; b=a//uXiJgwheCaO/OEdyJXyDpqXIwq16gr5R1GmH3IAeSZ+ZB6bl2dVSIV/ScQpkF80 eOJA75DzXeuxoL7ZCj1H3uPXgJSRFOg00qbVSVnq4StxHkwtIxjjRo8tf00d4uWRMCrU uaAljr1Pp+b2yeUfqja3lQUVpPdQCfZ/qEbB/5UQ4XU3c1uqpXSaplJt1lfksiNNF6+q vtg7UCfQZcaotXBYQrhhfTUkTkuTdHDQ53PqX66kga2SZx7+mN/1nzpZDkzyt1qTvus3 Mhwcnq1CD8SecFzyH/QzPYj9le6SvrZHwyj5Skx4/n70QJtIYbyb4Pog3fN75j+M28n7 4FYw==
- In-reply-to: <20170207074826.GV27938@sym.noone.org>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <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 %# "
Messages sorted by:
Reverse Date,
Date,
Thread,
Author