Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Tiny problem with a prompt
- X-seq: zsh-users 16169
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: ramshackle.industries@xxxxxxxxx
- Subject: Re: Tiny problem with a prompt
- Date: Sat, 30 Jul 2011 16:10:31 +0200
- Cc: zsh-users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=136zxjvFbYLE5cwcjvQ/jJoMQIrF8BDWPHpJ4UDHoqw=; b=gmmADESZoZZA8xn9R6NXPdH6e/+qBqAwlVsEhgr41B+xCaJC3X6O7fyMB7jLNTdzEr Tzr7NWZJPv8Va0tz7YNuvBPWn7ugVQOK0qLsYt6xjzDB5bN5EzvdTg9kxC+XA+6Q/OI9 pu0gR115WqKSZDRWxRohcSSw1q9v6kbvHPolQ=
- In-reply-to: <1312033657.2227.5.camel@localhost.localdomain>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <1312030627.2227.2.camel@localhost.localdomain> <CAHYJk3TUjWN3FffZ2-wVOaW24knM5ocQoHfsm6jgudrq16MPDw@mail.gmail.com> <1312033657.2227.5.camel@localhost.localdomain>
On 30 July 2011 15:47, Tomasz Moskal <ramshackle.industries@xxxxxxxxx> wrote:
> On Sat, 2011-07-30 at 15:00 +0200, Mikael Magnusson wrote:
>
>> You need to update PS1 inside precmd(), or use promptsubst and protect
>> the parameter expansion.
>
> Brilliant! Updating PS1 in precomd() did the trick. Would you mind
> explaining what did you mean by "protecting the parameter expansion" as
> the other solution?
Either by '$foo' or "\$foo" for example. Ie, put a literal $ sign in
the string. I would prefer updating PS1 in precmd() to setting
promptsubst though.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author