zsh:autoload:ls: Fix behavior when -d is given

This commit is contained in:
2020-09-28 03:23:11 +02:00
parent 86ad1a8536
commit 2540b917c3

View File

@@ -34,6 +34,14 @@ if ! (( ${#dirs} + ${#files} )); then
dirs+="$PWD"
fi
# Do not separate files and directories if -d flag was specified.
while getopts d flag 2>/dev/null; do
if [ "$flag" = "d" ]; then
command ls "$@" -- "${files[@]}" "${dirs[@]}"
return
fi
done
builtin local separator=""
# Print files.