diff --git a/.config/zsh/zshrc.d/40-functions.zsh b/.config/zsh/zshrc.d/40-functions.zsh index de14d36..159df90 100644 --- a/.config/zsh/zshrc.d/40-functions.zsh +++ b/.config/zsh/zshrc.d/40-functions.zsh @@ -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() {