Add trash-rm
This commit is contained in:
parent
7525f80708
commit
2cad0dfef1
14
init.zsh
14
init.zsh
@ -83,11 +83,21 @@ export VISUAL="${EDITOR}"
|
|||||||
alias se=sudoedit
|
alias se=sudoedit
|
||||||
|
|
||||||
# Safer file functions
|
# Safer file functions
|
||||||
|
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'
|
local rm_confirm_flag='-i'
|
||||||
uname | grep -i linux >/dev/null && rm_confirm_flag='-I'
|
uname | grep -i linux >/dev/null && rm_confirm_flag='-I'
|
||||||
alias rm="rm ${rm_confirm_flag}"
|
alias rm="rm ${rm_confirm_flag}"
|
||||||
alias cp="cp -i"
|
fi
|
||||||
alias mv="mv -i"
|
|
||||||
|
|
||||||
# Enable mouse support in less
|
# Enable mouse support in less
|
||||||
export LESS="--mouse"
|
export LESS="--mouse"
|
||||||
|
Loading…
Reference in New Issue
Block a user