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

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



On Aug 3,  4:44pm, Andrej Borsenkow wrote:
} Subject: RE: PATCH: Re: FW: About word splitting in read (Zsh)
}
} > > But still. The docs are wrong (backslashes inside the string). Should
} > > we change the code or the doc?
} >
} > This changes the docs.
} 
} And this tries to clarify it a bit more. The docs are IMHO still misleading -
} at least, I get impression that consecuitive whitespaces between words are
} eliminated. That is not the case:
} 
} bor@itsrm2% read foo
}   bar   baz
} bor@itsrm2% print %$foo%
} %bar   baz%

This happens only when "leftover fields [are] assigned to the last name."
It's consistent with bash.  Ash preserves both the inter-field AND the
trailing whitespace in that circumstance, which would lead me to guess
that the original Bourne `read' doesn't strip trailing whitespace.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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