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

Re: read & leading (and trailing) spaces



On May 13,  8:48am, Atom Smasher wrote:
}
} my interpretation of "raw" would mean "output is _identical_ to input". 
} should i apply a different interpretation to the read builtin?

"Raw" in this case is a mnemonic, not a definition.  The definition is
as written in the manual page.

The -r option does not mean "do not do field splitting."  If you do
    read -r foo bar
you still get one word in $foo and the remainder of the line in $bar,
just as is the documented behavior for "read".

} > I think you'll find that "read" in ksh, bash, etc. also removes leading
} > and trailing IFS characters, even with -r.
} ==================
} 
} if all of the other shells jumped off a bridge, would zsh jump too? 

It would if the command it was given was the "jumpoffbridge" builtin.

See also

http://www.opengroup.org/onlinepubs/9699919799/utilities/read.html

I'm probably the last person to argue that zsh should change anything to
become POSIX compliant, but I'm also the first person to argue that zsh
should continue doing what it always has, especially if that happens to
*be* POSIX compliant.



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