On 11/22/2013 10:36 AM, Aleksey Midenkov wrote:

> But nevertheless, I still find my proposal usable (since word
> splitting for vars is unlikely to be usable in scripts).

Scripts use word splitting on variables ALL the time.  For example, I
bet you have (multiple copies of) a script named install-sh somewhere on
your system.  It frequently uses word split variables, such as these
setup lines:

rmprog=${RMPROG-rm}
...
rmcmd="$rmprog -f"

for use in constructs like this:
          $doit $rmcmd -f "$dst" 2>/dev/null ||

Disabling word splitting for an interactive shell is one thing (and in
fact, zsh has done that in their default mode), but for scripting, you
would break LOTS of existing scripts if you changed the default behavior
of word splitting.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to