Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: FW: About word splitting in read (Zsh)



Bart Schaefer wrote:

> On Aug 1,  9:40am, Andrej Borsenkow wrote:
> } Subject: FW: About word splitting in read (Zsh)
> }
> } In (almost latest) CVS:
> } 
> } bor@itsrm2% read -r foo
> }    qwert   yuiop   !
> } bor@itsrm2% print -r $foo
> } qwert   yuiop   !
> } 
> } So, the question is - should we fix -r or introduce new option?
> 
> Neither.
> 
> zagzig[271] IFS=$'\n' read -r line <<<'   this has   many   spaces   ' 
> zagzig[272] echo %$line%
> %   this has   many   spaces   %

Ouch. I didn't remember that, even though I already used it...


But still. The docs are wrong (backslashes inside the string). Should
we change the code or the doc?

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author