Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[bug] redirections and nullglob+multios
- X-seq: zsh-workers 53945
- From: Stephane Chazelas <stephane@xxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: [bug] redirections and nullglob+multios
- Date: Fri, 19 Sep 2025 05:16:55 +0100
- Archived-at: <https://zsh.org/workers/53945>
- List-id: <zsh-workers.zsh.org>
- Mail-followup-to: Zsh hackers list <zsh-workers@xxxxxxx>
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