From 738278374ed672f8936e432e3d1a7b10bd11c002 Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Thu, 1 Dec 2022 07:40:17 -0800 Subject: [PATCH] Remove trash-cli --- README.md | 1 - init.zsh | 18 +++--------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 34e56e6..6ffc4eb 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ This is my personal zsh configuraton. ### Requirements * [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 * [exa](https://github.com/ogham/exa)* - better ls * [bat](https://github.com/sharkdp/bat)* - better cat, less, man, etc. diff --git a/init.zsh b/init.zsh index b4c5249..2eaf3ab 100644 --- a/init.zsh +++ b/init.zsh @@ -50,24 +50,12 @@ 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}" alias cp="cp -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 bindkey -v # Implement a replace mode