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