From 8492f4ea6475292519a55e79dfb96894d540dcb6 Mon Sep 17 00:00:00 2001 From: Kim Date: Tue, 21 Sep 2021 19:36:27 +0200 Subject: [PATCH] fix trash_rm --- trash.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trash.sh b/trash.sh index f9335da..035dd27 100644 --- a/trash.sh +++ b/trash.sh @@ -38,7 +38,7 @@ trash_restore() { trash_rm() { for FILE_TO_REMOVE in "$@"; do - if [[ ! "$FILE_TO_REMOVE" =~ $HOME/.trash ]] + if ! echo "$FILE_TO_REMOVE" | grep "$HOME/.trash" then FILE_TO_REMOVE="$HOME/.trash/$FILE_TO_REMOVE" fi if [ -f "$FILE_TO_REMOVE" ]; then