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

Re: (N) defaults to whole directory listing




On Jan 30, 2021, at 4:50 AM, Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx> wrote:

On Fri, Jan 29, 2021 at 8:04 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:

On Fri, Jan 29, 2021 at 7:33 AM Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:

 print -rC1 -- no_such_file(N)

This will print `no_such_file` if such file exists and will do nothing
otherwise.

Not precisely nothing ... it will print a newline.

If the file doesn't exist, the command is equivalent to this:

 print -rC1 --

This command doesn't print anything.

% print -rC1 -- no_such_file(N)

zsh 5.8 (Ubuntu): prints nothing
zsh 5.7.1 (Mac): prints return


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