zsh:ls-show-hidden: Fix listing of broken symlinks

The `-e` and `-d` checks fail if the file is a broken symlink, which
would lead to a 'No such file...' message for each of them.
This commit is contained in:
2022-12-27 16:47:17 +01:00
parent c4125ddc25
commit 3ddfadf360

View File

@@ -37,7 +37,7 @@ for arg in "$@"; do
set -- "$@" "$arg"
elif [[ -d "$arg" ]]; then
dirs+="$arg"
elif [[ -e "$arg" ]]; then
elif [[ -e "$arg" || -L "$arg" ]]; then
files+="$arg"
else
printf >&2 "%s%s: cannot access '%s': No such file or directory%s\n" \