{bash,zsh}rc: be just a bit less lazy about the getfacl

This commit is contained in:
Aminda Suomalainen 2024-08-04 14:32:38 +03:00
parent 7819cfac8c
commit d76df5c1c9
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
2 changed files with 14 additions and 4 deletions

View File

@ -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"

View File

@ -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"