zsh-workers
 help / color / mirror / code / Atom feed
* The ~ parameter expansion flag: bug or misunderstanding
@ 2014-09-03 14:58 Clint Hepner
  2014-09-03 15:14 ` Peter Stephenson
  2014-09-03 15:44 ` Bart Schaefer
  0 siblings, 2 replies; 8+ messages in thread
From: Clint Hepner @ 2014-09-03 14:58 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 355 bytes --]

I understand that you can split a parameter value on a fixed string:

% print -l ${(s.1.):-a1b1c}
a
b
c

My reading of the ~ flag leads me to believe that you can replace the
literal string with a pattern, so that

% print -l ${(~s.[12].):-a1b2c}
a
b
c

However, the ~ flag seems to have no effect, with the parameter string
remaining unsplit.

-- 
Clint

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-09-09 16:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-03 14:58 The ~ parameter expansion flag: bug or misunderstanding Clint Hepner
2014-09-03 15:14 ` Peter Stephenson
2014-09-04  3:18   ` Bart Schaefer
2014-09-04 19:10     ` Peter Stephenson
2014-09-03 15:44 ` Bart Schaefer
2014-09-09 16:21   ` Clint Hepner
2014-09-09 16:41     ` Peter Stephenson
2014-09-09 16:54       ` Clint Hepner

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).