* Another Dash vs. hyphen bug?
@ 2020-09-06 2:23 Bart Schaefer
2020-09-06 3:17 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Bart Schaefer @ 2020-09-06 2:23 UTC (permalink / raw)
To: Zsh hackers list
The split doesn't work as expected in the first case below, probably
because the hyphen has been tokenized (or has failed to be
un-tokenized).
% print -r -- ${(@s.-.):-A-B}
A-B
% print -r -- ${(@s.-.):-A\-B}
A B
% ab=A-B
% print -r -- ${(@s.-.):-$ab}
A B
%
I'm not exactly sure what should happen in this case:
% print -r -- ${(@~s.-.):-A-B}
A B
%
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Another Dash vs. hyphen bug?
2020-09-06 2:23 Another Dash vs. hyphen bug? Bart Schaefer
@ 2020-09-06 3:17 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2020-09-06 3:17 UTC (permalink / raw)
To: Zsh hackers list
On Sat, Sep 5, 2020 at 7:23 PM Bart Schaefer <schaefer@brasslantern.com> wrote:
>
> I'm not exactly sure what should happen in this case:
A couple more oddballs, although not really unexpected given the
previously mentioned cases:
% ab=A-B
% print -r -- ${(@~s.-.):-${~ab}}
A B
% print -r -- ${(@s.-.):-${~ab}}
A-B
%
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-06 3:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-06 2:23 Another Dash vs. hyphen bug? Bart Schaefer
2020-09-06 3:17 ` Bart Schaefer
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).