Add trash-cli aliases and disable normal rm

This commit is contained in:
Alexander Rosenberg 2022-11-30 22:53:46 -08:00
parent 4d4d4cbdfe
commit ce0a63dc2d
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

View File

@ -49,12 +49,21 @@ alias cd..="cd .."
export LESS="--mouse"
# Safer file functions
local rm_confirm_flag='-i'
uname | grep -i linux >/dev/null && rm_confirm_flag='-I'
alias rm="rm ${rm_confirm_flag}"
#local rm_confirm_flag='-i'
#uname | grep -i linux >/dev/null && rm_confirm_flag='-I'
#alias rm="rm ${rm_confirm_flag}"
function rm() {
echo 'Use trash-put (aliased to "tp") to delete items.'
echo 'If you REALLY want to continue, use "command rm"'
}
alias cp="cp -i"
alias mv="mv -i"
# trash-cli
alias tp='trash-put'
alias tls='trash-list'
alias trs='trash-restore'
# Use vi mode
bindkey -v
# Implement a replace mode