zsh:ls-show-hidden: Correct print format
When an argument is passed that does not exist, `ls` always prints the directory name for the existing ones, even if there is only one remaining directory that is listed.
This commit is contained in:
@@ -90,7 +90,7 @@ for dir in ${(@f)dirs}; do
|
|||||||
fi
|
fi
|
||||||
# If there are multiple items to list, print a newline (if ls was already
|
# If there are multiple items to list, print a newline (if ls was already
|
||||||
# executed) followed by the dir-name.
|
# executed) followed by the dir-name.
|
||||||
! (( ${#dirs} + ${#files} - 1 )) || echo "$separator$dir:"
|
! (( ${#dirs} + ${#files} + ${non_existing} - 1 )) || echo "$separator$dir:"
|
||||||
# Print directory. $all_flag has to be unquoted else ls will fail.
|
# Print directory. $all_flag has to be unquoted else ls will fail.
|
||||||
command $LS_COMMAND "$@" $all_flag -- "$dir"
|
command $LS_COMMAND "$@" $all_flag -- "$dir"
|
||||||
separator="\n"
|
separator="\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user