Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Empty $''
- X-seq: zsh-workers 38098
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Empty $''
- Date: Sat, 5 Mar 2016 08:35:57 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=0S25DdIG09hxVVQdqfb9uIkOuqz0MehRRmy00HRhbLU=; b=FBF5/ueofeS1MOdXg2NE83Yfwh+HOQkyLyOHasjC0cctUaEc9mHwkpm0/v4gF4dQYD QEdTckkqBbcavb6gcxciIXgETGdAJaCf3bnGjHBphcVYQkvKB6bhEQH821QgUE4Cb9ip tY3wahN3L4VjOvdHq+G3mfcAu30AvH9GBBFWqhEWrHsc+OgLovCBHxj1Y/K0e/EShst+ P4WsrtsBPsgCTuSFqk8idOp7iZSdZ/wSZAZX7JWMpXEmEIhb9VvNAiYkQRUQGReVV1kZ wP7fhFLjAzdgARMbS8CQCJnt9jQ6vp17ziQFAOewjzI38/H98unfmRFYbKURUOROV6MN BKnQ==
- In-reply-to: <20160304121435.0d07611f@pwslap01u.europe.root.pri>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1533e4d3e82.cbf3800a134118.3897690426664036468@enosys.org> <160303153436.ZM31948@torch.brasslantern.com> <160303153647.ZM31964@torch.brasslantern.com> <20160304103502.531f6bb9@pwslap01u.europe.root.pri> <20160304121435.0d07611f@pwslap01u.europe.root.pri>
On Mar 4, 12:14pm, Peter Stephenson wrote:
} Subject: Re: Empty $''
}
} - else
} + else if (*strsub)
} strret = strsub;
} + else {
} + /* This ensures a $'' doesn't get elided. */
} + strret = dupstring(nulstring);
} + }
This looks fine; I wasn't sure whether (*strsub) was ever nonzero in
this case but it should be harmless to append a Nulstring to another
string (happens with e.g. foo"" already I think) so I took a shortcut.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author