Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: promptsubst and empty variables
- X-seq: zsh-workers 25673
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxxxxx>
- Subject: Re: promptsubst and empty variables
- Date: Mon, 15 Sep 2008 17:28:30 +0200
- In-reply-to: <20080915153452.68eeddbc@news01>
- Mail-followup-to: zsh workers <zsh-workers@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20080914092459.GK2182@xxxxxxxxxxxxxxx> <080914094322.ZM22699@xxxxxxxxxxxxxxxxxxxxxx> <20080915153452.68eeddbc@news01>
Peter Stephenson <pws@xxxxxxx>:
[...]
> I hope, actually, it's dupstring(nulstring), or substitution is a bit
> broken.
>
> I don't think we need the Nularg in this case since although the string is
> metafied we're not doing anything special with tokens. However, I've never
> understood what this was for in the first place, so I may have missed
> something. If I have, however, we're not going to find out without trying
> it.
[...]
> + /*
> + * We don't need the special Nularg hack here and we're
> + * going to be using Nularg for other things.
> + */
> + if (*s == Nularg && s[1] == '\0')
> + *s = '\0';
I just gave this a try.
And it fixes the problem for me. For my test case as well as my real
prompt - which wasn't struck by the problem, but this change does not
break anything, AFAICS.
Regards, Frank
--
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
-- RFC 1925
Messages sorted by:
Reverse Date,
Date,
Thread,
Author