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

Re: (N) defaults to whole directory listing



On 2021-01-29 7:33 a.m., Roman Perepelitsa wrote:

`ls` without arguments lists files in the current directory. This is
mandated by POSIX and what everyone expects.
Of course.

`no_such_file(N)` expands to nothing if there is no file named
`no_such_file` in the current directory. This is in line with the zsh
documentation and what everyone expects.
That's about what I I expected to hear.  zsh can't be expected to feed 'ls' with something that duplicates a non-existent file, it can only remove the non-existent file thus leaving no argument thus ls must be 'ls *'.  I had thought there might be some hidden mechanism by which ls might be informed that the given argument fails but I can quite understand that no such thing exists -- zsh just removes the non-existent argument and that's all she can do and ls is on it's own.  Thanks Roman.




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