diff options
-rwxr-xr-x | modules/by-name/lf/lf/commands/scripts/trash_clear.sh | 2 | ||||
-rwxr-xr-x | modules/by-name/lf/lf/commands/scripts/trash_restore.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/by-name/lf/lf/commands/scripts/trash_clear.sh b/modules/by-name/lf/lf/commands/scripts/trash_clear.sh index e3c2f795..faa3c553 100755 --- a/modules/by-name/lf/lf/commands/scripts/trash_clear.sh +++ b/modules/by-name/lf/lf/commands/scripts/trash_clear.sh @@ -4,6 +4,6 @@ while read -r file; do set -- "$@" "$(pwd)/$file" done <"$(conceal list | fzf --multi --ansi | awk '{for(i=3; i<=NF; i++) {print $i}}' | tmp)" -trash empty --match=exact "$@" +[ "$#" -ne 0 ] && trash empty --match=exact "$@" # vim: ft=sh diff --git a/modules/by-name/lf/lf/commands/scripts/trash_restore.sh b/modules/by-name/lf/lf/commands/scripts/trash_restore.sh index aa9ca0dc..f685345f 100755 --- a/modules/by-name/lf/lf/commands/scripts/trash_restore.sh +++ b/modules/by-name/lf/lf/commands/scripts/trash_restore.sh @@ -13,5 +13,5 @@ while read -r file; do set -- "$@" "$(pwd)/$file" done <"$(conceal list | fzf --multi --ansi | awk '{for(i=3; i<=NF; i++) {print $i}}' | tmp)" -trash restore --match=exact "$@" +[ "$#" -ne 0 ] && trash restore --match=exact "$@" # vim: ft=sh |