* $'...' and double-quotes @ 2000-03-06 5:13 Bart Schaefer 2000-03-06 12:22 ` Zefram 0 siblings, 1 reply; 4+ messages in thread From: Bart Schaefer @ 2000-03-06 5:13 UTC (permalink / raw) To: zsh-workers zsh% x="$'\012'" zsh% echo $x $'\012' Hrm. I would have thought $'...' acted like any other string-substitution when inside double-quotes, i.e. like $(...) $[...] and $((...)) all do. I suppose the reason it doesn't work is because "'" is a quoted single quote, not an ordinary single quote ...? I'm not certain this needs to be changed, but I wanted to be sure it's intentional. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: $'...' and double-quotes 2000-03-06 5:13 $'...' and double-quotes Bart Schaefer @ 2000-03-06 12:22 ` Zefram 2000-03-07 8:35 ` Prompt escapes " Andrej Borsenkow 0 siblings, 1 reply; 4+ messages in thread From: Zefram @ 2000-03-06 12:22 UTC (permalink / raw) To: Bart Schaefer; +Cc: zsh-workers Bart Schaefer wrote: >zsh% x="$'\012'" >zsh% echo $x >$'\012' bash has the same behaviour. -zefram ^ permalink raw reply [flat|nested] 4+ messages in thread
* Prompt escapes RE: $'...' and double-quotes 2000-03-06 12:22 ` Zefram @ 2000-03-07 8:35 ` Andrej Borsenkow 2000-03-07 16:38 ` Bart Schaefer 0 siblings, 1 reply; 4+ messages in thread From: Andrej Borsenkow @ 2000-03-07 8:35 UTC (permalink / raw) To: Zefram, Bart Schaefer; +Cc: zsh-workers $'...' reminds me - is there any easy way to get prompt escapes embedded? Manual for $'...' states, it the same as for print builtin - but print may be forced to interpret prompt escapes as well. -andrej Have a nice DOS! B >> ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Prompt escapes RE: $'...' and double-quotes 2000-03-07 8:35 ` Prompt escapes " Andrej Borsenkow @ 2000-03-07 16:38 ` Bart Schaefer 0 siblings, 0 replies; 4+ messages in thread From: Bart Schaefer @ 2000-03-07 16:38 UTC (permalink / raw) To: Andrej Borsenkow; +Cc: zsh-workers On Mar 7, 11:35am, Andrej Borsenkow wrote: } Subject: Prompt escapes RE: $'...' and double-quotes } } $'...' reminds me - is there any easy way to get prompt escapes embedded? In 3.1.6, ${(%)...}. So these should be equivalent: print -P "${PS1}" print "${(%)PS1}" -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2000-03-07 16:41 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2000-03-06 5:13 $'...' and double-quotes Bart Schaefer 2000-03-06 12:22 ` Zefram 2000-03-07 8:35 ` Prompt escapes " Andrej Borsenkow 2000-03-07 16:38 ` 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).