From cb98842736835c0491a8dbda5243214fa124e4d7 Mon Sep 17 00:00:00 2001 From: Dict Xiong Date: Sun, 20 Nov 2022 11:34:04 +0800 Subject: [PATCH] if trash, disable rm --- .zshrc2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.zshrc2 b/.zshrc2 index 84e42bb..7ebc191 100644 --- a/.zshrc2 +++ b/.zshrc2 @@ -92,6 +92,9 @@ case $(bash "$DOTFILES/tools/common.sh" get_os_type) in macos ) alias l='ls -lAGh -D "%y-%m-%d %H:%M"' ;; * ) alias l='ls -lAGh --time-style="+%y-%m-%d %H:%M"' ;; esac +if [[ -x $(command -v trash) ]]; then + alias "rm"="echo use the full path i.e. '/bin/rm'; consider using trash" +fi sibd() { ssh -p 12022 root@$1${1:+.}ibd.ink } sob() { ssh -p 24022 root@$1${1:+.}ob.ac.cn } snasp() { ssh -o ProxyJump="ssh@nasp.ob.ac.cn:36022" dictxiong@$1 }