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

Re: bufferwords() lexes a subshell in a shortloop repeat as a string



On Jan 15,  9:41am, Peter Stephenson wrote:
} Subject: Re: bufferwords() lexes a subshell in a shortloop repeat as a str
}
} it's just splitting words, and (... ...) indeed works as a complete word

Urk.  That probably ought to be disabled, at least in shell emulation,
e.g. here is bash:

schaefer@burner$ echo one (two three) four
bash: syntax error near unexpected token `('

Here's an interesting side effect:

torch% touch "two three"
torch% unsetopt bareglobqual
torch% ls -l (two three)
-rw-rw-r--  1 schaefer schaefer 0 Jan 15 11:22 two three

It becomes another way to quote spaces in file names, but only if the file
already exists.

torch% touch (one two)
zsh: no matches found: (one two)



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