From 736a53bad077e8c18c8b87213f720069f886844c Mon Sep 17 00:00:00 2001 From: Kim Date: Tue, 21 Sep 2021 18:40:04 +0200 Subject: [PATCH] fix mv --- trash.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/trash.sh b/trash.sh index f26192a..5e0aa23 100644 --- a/trash.sh +++ b/trash.sh @@ -10,11 +10,11 @@ trash_list() { } trash_put() { - for i in "$@"; do + for FILE in $@; do # Store old filepath for later restore - echo "$i $(readlink -f $i)" >> "$FILE_PATHS_FILE" + echo "$FILE $(readlink -f "$FILE")" >> "$FILE_PATHS_FILE" done - mv -uv "$*" "$HOME"/.trash/ + mv -uv $* "$HOME"/.trash/ } trash_empty() {