From: Frank Terbeck <ft@bewatermyfriend.org>
To: zsh workers <zsh-workers@sunsite.dk>
Subject: Re: promptsubst and empty variables
Date: Mon, 15 Sep 2008 17:28:30 +0200 [thread overview]
Message-ID: <20080915152830.GL2182@fsst.voodoo.lan> (raw)
In-Reply-To: <20080915153452.68eeddbc@news01>
Peter Stephenson <pws@csr.com>:
[...]
> 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
prev parent reply other threads:[~2008-09-15 15:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-14 9:24 Frank Terbeck
2008-09-14 16:43 ` Bart Schaefer
2008-09-15 14:34 ` Peter Stephenson
2008-09-15 15:28 ` Frank Terbeck [this message]
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=20080915152830.GL2182@fsst.voodoo.lan \
--to=ft@bewatermyfriend.org \
--cc=zsh-workers@sunsite.dk \
/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).