zsh:funcs: Create trash wrapper only if exists

This commit is contained in:
2021-07-22 15:38:14 +02:00
parent 11f7c14fd4
commit 15c0252fda

View File

@@ -286,14 +286,16 @@ crypt-umount() {
udisksctl power-off -b "$1"
}
## List items in trash if no argument is specified
trash() {
if (( ! $# )); then
command trash-list
else
command trash "$@"
fi
}
if (( $+commands[trash] )); then
## List items in trash if no argument is specified
trash() {
if (( ! $# )); then
command trash-list
else
command trash "$@"
fi
}
fi
## Move one or more file(s) but keep a symlink to the new location.
mvln() {