Add trash-cli aliases and disable normal rm
This commit is contained in:
parent
4d4d4cbdfe
commit
ce0a63dc2d
15
init.zsh
15
init.zsh
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user