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

[bug] redirections and nullglob+multios



With multios on (default) and nullglob on or (N), (#qN) glob
qualifier, I find (in an empty directory):

$ zsh -c 'echo > xxx(N)'
$ ls
'xxx'$'\210''N'$'\212'
$ zsh -o extendedglob -c 'echo > xxx(#qN)'
$ zsh -o nullglob -c 'echo > yyy*'
$ zsh +o multios -c 'echo > yyy(N)' # that one fine
$ ls
'xxx'$'\210''N'$'\212'  'xxx'$'\210\204''qN'$'\212'  'yyy'$'\207'  'yyy(N)'

See also:

$ zsh -c '< zz(N)'
zsh:1: no such file or directory: zz(N)
$ echo test > 'zz(N)'
$ zsh -c '< zz(N)'
zsh:1: no such file or directory: zz(N)
$ echo foo > $'zz\210N\212'
$ zsh -c '< zz(N)'
foo

Expected:

An error that you can't redirect to an empty list of files or an
error that the file with empty name can't be opened like for
redirections to empty arrays.

$ zsh -c 'files=(); echo > $files' |& sed -n l
zsh:1: no such file or directory: $

-- 
Stephane




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