diff --git a/rc/bashrc b/rc/bashrc index 46e36a19..49bc17c8 100755 --- a/rc/bashrc +++ b/rc/bashrc @@ -922,11 +922,16 @@ adduser-to-group() { usermod -aG "$2" "$1" } -# Very lazy ACL aware ls +# Lazyish ACL aware ls unalias ls ls() { env ls --all --color=auto --human-readable "$@" - getfacl --absolute-names --skip-base "$@" + if hash getfacl 2> /dev/null; then + if [[ -d "$@" || -f "$@" ]]; then + printf "\n" + getfacl --absolute-names --skip-base "$@" + fi + fi } alias ll="ls -la" diff --git a/rc/zshrc b/rc/zshrc index e06a66e8..6913f285 100755 --- a/rc/zshrc +++ b/rc/zshrc @@ -908,11 +908,16 @@ adduser-to-group() { usermod -aG "$2" "$1" } -# Very lazy ACL aware ls +# Lazyish ACL aware ls unalias ls ls() { env ls --all --color=auto --human-readable "$@" - getfacl --absolute-names --skip-base "$@" + if hash getfacl 2> /dev/null; then + if [[ -d "$@" || -f "$@" ]]; then + printf "\n" + getfacl --absolute-names --skip-base "$@" + fi + fi } alias ll="ls -la"