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