mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-25 12:49:26 +01:00
{bash,zsh}rc: be just a bit less lazy about the getfacl
This commit is contained in:
parent
7819cfac8c
commit
d76df5c1c9
@ -922,11 +922,16 @@ adduser-to-group() {
|
|||||||
usermod -aG "$2" "$1"
|
usermod -aG "$2" "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Very lazy ACL aware ls
|
# Lazyish ACL aware ls
|
||||||
unalias ls
|
unalias ls
|
||||||
ls() {
|
ls() {
|
||||||
env ls --all --color=auto --human-readable "$@"
|
env ls --all --color=auto --human-readable "$@"
|
||||||
|
if hash getfacl 2> /dev/null; then
|
||||||
|
if [[ -d "$@" || -f "$@" ]]; then
|
||||||
|
printf "\n"
|
||||||
getfacl --absolute-names --skip-base "$@"
|
getfacl --absolute-names --skip-base "$@"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
alias ll="ls -la"
|
alias ll="ls -la"
|
||||||
|
|
||||||
|
7
rc/zshrc
7
rc/zshrc
@ -908,11 +908,16 @@ adduser-to-group() {
|
|||||||
usermod -aG "$2" "$1"
|
usermod -aG "$2" "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Very lazy ACL aware ls
|
# Lazyish ACL aware ls
|
||||||
unalias ls
|
unalias ls
|
||||||
ls() {
|
ls() {
|
||||||
env ls --all --color=auto --human-readable "$@"
|
env ls --all --color=auto --human-readable "$@"
|
||||||
|
if hash getfacl 2> /dev/null; then
|
||||||
|
if [[ -d "$@" || -f "$@" ]]; then
|
||||||
|
printf "\n"
|
||||||
getfacl --absolute-names --skip-base "$@"
|
getfacl --absolute-names --skip-base "$@"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
alias ll="ls -la"
|
alias ll="ls -la"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user