zsh-users
 help / color / mirror / code / Atom feed
* Parameter subsitution
@ 2021-01-08 22:02 Lewis Butler
  2021-01-08 22:25 ` Bart Schaefer
  0 siblings, 1 reply; 8+ messages in thread
From: Lewis Butler @ 2021-01-08 22:02 UTC (permalink / raw)
  To: Zsh Users

Reading through the docs:

The s/l/r/ substitution works as follows. 
 [. . . ]
* A null l uses the previous string either from the previous l or from the contextual scan string s from ‘!?s’. 

And

* Note the same record of the last l and r is maintained across all forms of expansion.

Does this mean that l is recorded until the shell terminates or until a new l is used? Is there a way to see what the current l is set to?

$ file="/usr/local/tmp/filename.txt"
$ echo ${file:s|e|3}
/usr/local/tmp/fil3name.txt
$ echo ${file:s||4}
/usr/local/tmp/filename.txt

Doesn't look like the l is maintained?

And where is the !?s syntax defined?

Any examples of using !?s in anger?

-- 
ɹןʇnqן
<mailto:lbutler@covisp.net>
tel:+1.303.219.0564





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

end of thread, other threads:[~2021-01-09  1:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-08 22:02 Parameter subsitution Lewis Butler
2021-01-08 22:25 ` Bart Schaefer
2021-01-08 22:31   ` Lewis Butler
2021-01-08 22:53     ` Bart Schaefer
2021-01-08 23:46       ` Lewis Butler
2021-01-09  0:00         ` Lawrence Velázquez
2021-01-09  0:49           ` Bart Schaefer
2021-01-09  1:09           ` Lewis Butler

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