zsh-workers
 help / color / mirror / Atom feed
* 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

zsh-workers

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/zsh-workers

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 zsh-workers zsh-workers/ http://inbox.vuxu.org/zsh-workers \
		zsh-workers@zsh.org
	public-inbox-index zsh-workers

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.workers


code repositories for the project(s) associated with this inbox:

	https://git.vuxu.org/mirror/zsh/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git