zsh:ls-show-hidden: Fix ./ listing on non-existing

Fix a bug that ls-show-hidden always listed `./` when all other non-flag
arguments were non-existing (in addition to their 'No such file...'
message).
This commit is contained in:
2022-12-27 16:45:06 +01:00
parent 9b0e49b319
commit c4125ddc25

View File

@@ -49,6 +49,8 @@ done
# Print working directory when only flags were given as arguments.
if ! (( $#dirs + $#files + $non_existing )); then
dirs+=.
elif ! (( $#dirs + $#files )); then
return 2
fi
# Just pass everything to ls when the -d flag is given since then the -A flag