Remove trash-cli
This commit is contained in:
parent
0d52900c6b
commit
738278374e
@ -3,7 +3,6 @@ This is my personal zsh configuraton.
|
|||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
* [starship](https://github.com/starship/starship) - a pretty and fast prompt
|
* [starship](https://github.com/starship/starship) - a pretty and fast prompt
|
||||||
* [trash-cli](https://github.com/andreafrancia/trash-cli)* - safer rm
|
|
||||||
* [direnv](https://github.com/direnv/direnv)* - runs on cd, safely set enviroment
|
* [direnv](https://github.com/direnv/direnv)* - runs on cd, safely set enviroment
|
||||||
* [exa](https://github.com/ogham/exa)* - better ls
|
* [exa](https://github.com/ogham/exa)* - better ls
|
||||||
* [bat](https://github.com/sharkdp/bat)* - better cat, less, man, etc.
|
* [bat](https://github.com/sharkdp/bat)* - better cat, less, man, etc.
|
||||||
|
18
init.zsh
18
init.zsh
@ -50,24 +50,12 @@ alias cd..="cd .."
|
|||||||
export LESS="--mouse"
|
export LESS="--mouse"
|
||||||
|
|
||||||
# Safer file functions
|
# 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 cp="cp -i"
|
||||||
alias mv="mv -i"
|
alias mv="mv -i"
|
||||||
|
|
||||||
# trash-cli
|
|
||||||
if which trash-put >/dev/null 2>&1; then
|
|
||||||
function rm() {
|
|
||||||
echo 'Use trash-put (aliased to "tp") to delete items.'
|
|
||||||
echo 'If you REALLY want to continue, use "command rm"'
|
|
||||||
}
|
|
||||||
alias tp='trash-put'
|
|
||||||
alias tls='trash-list'
|
|
||||||
alias trs='trash-restore'
|
|
||||||
else
|
|
||||||
local rm_confirm_flag='-i'
|
|
||||||
uname | grep -i linux >/dev/null && rm_confirm_flag='-I'
|
|
||||||
alias rm="rm ${rm_confirm_flag}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use vi mode
|
# Use vi mode
|
||||||
bindkey -v
|
bindkey -v
|
||||||
# Implement a replace mode
|
# Implement a replace mode
|
||||||
|
Loading…
Reference in New Issue
Block a user