From: Axel Beckert <abe@deuxchevaux.org>
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: Tue, 14 Feb 2017 17:18:18 +0100 [thread overview]
Message-ID: <20170214161817.GO27938@sym.noone.org> (raw)
In-Reply-To: <20170214153229.GN27938@sym.noone.org>
Hi again,
On Tue, Feb 14, 2017 at 04:32:30PM +0100, Axel Beckert wrote:
> On Fri, Feb 10, 2017 at 09:59:49AM -0800, Bart Schaefer wrote:
> > 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
> […]
> > 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.
>
> You're right. The main issue is probably that I wrote that part years
> ago and was surprised that its behaviour changed. But I can't remember
> anymore why I've chosen %N over $0.
I now know again…
> Will replace it with $0 and see if that works out as expected.
That's worse: Now the prompt _always_ shows
"/home/abe/.zsh/zsh.d/15-prompt" (which is the sourced file where the
PS1 assigning happens) instead of e.g. "/usr/bin/zsh". So that needs
some more fine-tuning.
$ZSH_NAME seems close, except that it doesn't show "su" if the shell
was spawned by using "su" (neglectable) and that it doesn't show the
leading dash if it's a login shell.
What I was looking for seems to be $ZSH_ARGZERO. So far that works
fine. I hope, it's backwards compatible to at least 4.3.9 from Debian
7 Wheezy. :-)
Kind regards, Axel
--
/~\ Plain Text Ribbon Campaign | Axel Beckert
\ / Say No to HTML in E-Mail and News | abe@deuxchevaux.org (Mail)
X See http://www.nonhtmlmail.org/campaign.html | abe@noone.org (Mail+Jabber)
/ \ I love long mails: http://email.is-not-s.ms/ | http://abe.noone.org/ (Web)
next prev parent reply other threads:[~2017-02-14 16:18 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
2017-02-14 15:32 ` Axel Beckert
2017-02-14 16:18 ` Axel Beckert [this message]
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=20170214161817.GO27938@sym.noone.org \
--to=abe@deuxchevaux.org \
--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).