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() {