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 40544
- From: Axel Beckert <abe@xxxxxxxxxxxxxxx>
- 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: Tue, 14 Feb 2017 17:18:18 +0100
- Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAAAAAC3mUtaAAAABGdBTUEAALGPC/xhBQAAADh0RVh0U29mdHdhcmUAWFYgVmVyc2lvbiAzLjEwYSAgUmV2OiAxMi8yOS85NCAoUE5HIHBhdGNoIDEuMindFS5JAAACGElEQVQ4jXXQMU8UYRDG8f8shNjdDH4AbpfGDjAWlKiJiZ0ajL1aGCvsNCbGaCGG1koLaztaTYz6ATy+gOyehYmF3MxVxgg3FnDsHcTpJr/M+8w7Rf6nCsaVTTDqxbg9hoOXmw83H71+Eyfg4E1d7/Z2fG9rGkZbTQiu+K+3U/C+76lmkvAhJuDndnoAiftou4V84okAGclop4U/jYACZDTxrYWP0gkxVfAm/W//GLZpxIzwIN0Hn8dw0B+IWkZmQmRsj2HfhwokEklHfNCCiQCRgAR7YyhQVRVTCKCzP4Y5zBBE0t0zY3Q8oQaBqqAMlVEcgVQd9706zGirAFium8HXumlMIeMwqQCInju+2+uB6MRENupdpMt8pRlHZyuAW0F+Mb6XSIVqtxjD+iVmVqqystLEzFTGT92YqRaXpNT5eTVjeJhbALPnrTxLUZUKZsgxcNm64hAOYisT/xhF+oKTGU5RegtC3Rt6eEDi/QnIevdTx9Md2EMmYBRmCQR1026FCGQQJJExsRUqgkMGaWSbwYLnoO4T6VgpbQbdELPMBAHWWrhYrcxXnYgAsatPWygkFCBD4K62MAsOTqA6szYRPpsu6e6Y8mPiVrBMNuGIMrgwBUu4p2DgG1Ownu6hpuTv7hScefHAzAC/yRRw5U5pALMbJ4AUALvHSZhxgHPXTsHcdWD1GadAHr9avP+c0wCr7263Df8ASLwXWHWs+KIAAAAHdElNRQfYBQEBODPr
- In-reply-to: <20170214153229.GN27938@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>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: DeuxChevaux.org -- The Citroën 2CV Database
- References: <20170207074826.GV27938@sym.noone.org> <170210095949.ZM9880@torch.brasslantern.com> <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@xxxxxxxxxxxxxxx (Mail)
X See http://www.nonhtmlmail.org/campaign.html | abe@xxxxxxxxx (Mail+Jabber)
/ \ I love long mails: http://email.is-not-s.ms/ | http://abe.noone.org/ (Web)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author