* Another interesting (P) effect
@ 2015-11-15 18:08 Bart Schaefer
0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 2015-11-15 18:08 UTC (permalink / raw)
To: zsh-workers
This isn't new, but given that ${(P)${(f)lines} is an example in the
"Rules" (rule 23), seems worth mentioning:
torch% a=AYY
torch% abc=AYYBEESEE
torch% lines=$'a\nb\nc'
torch% print ${(P)${(f)lines}}
AYY
So (P) parses off the first thing that looks like a parameter name and
discards everything else, with no error.
torch% IFS='' eval 'print ${(P)${(f)lines}}'
AYYBEESEE
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-11-15 18:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-15 18:08 Another interesting (P) effect 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).