Add trash-cli

This commit is contained in:
Alexander Rosenberg 2023-10-30 22:46:20 -07:00
parent 7525f80708
commit 000057b2c4
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

View File

@ -83,12 +83,22 @@ export VISUAL="${EDITOR}"
alias se=sudoedit
# Safer file functions
local rm_confirm_flag='-i'
uname | grep -i linux >/dev/null && rm_confirm_flag='-I'
alias rm="rm ${rm_confirm_flag}"
alias cp="cp -i"
alias mv="mv -i"
# Trash put for safety
if cmd_exists trash-put; then
alias rm=trash-put
alias trr=trash-restore
alias trl=trash-list
alias tre=trash-empty
alias trm=trash-rm
else
local rm_confirm_flag='-i'
uname | grep -i linux >/dev/null && rm_confirm_flag='-I'
alias rm="rm ${rm_confirm_flag}"
fi
# Enable mouse support in less
export LESS="--mouse"