From c4125ddc257414792343a3e5154514ed6958376a Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Tue, 27 Dec 2022 16:45:06 +0100 Subject: [PATCH] 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). --- .config/zsh/autoload/ls-show-hidden | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/zsh/autoload/ls-show-hidden b/.config/zsh/autoload/ls-show-hidden index f542e08..bbbd3c9 100755 --- a/.config/zsh/autoload/ls-show-hidden +++ b/.config/zsh/autoload/ls-show-hidden @@ -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