diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2020-11-10 00:36:16 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2020-11-10 00:36:16 +0530 |
commit | 1418ecde0dc28dc7d32a9ffdcf0721db7bd2d624 (patch) | |
tree | ebd721f0d4421ef8624193950c782f91612b3958 | |
parent | 8b9e0edc94ab6e35df0598d4008f72a92db9d868 (diff) | |
download | nnn-1418ecde0dc28dc7d32a9ffdcf0721db7bd2d624.tar.gz |
Skip rm invocation when no files to delete
-rwxr-xr-x | plugins/dups | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/dups b/plugins/dups index 02954e8..98e8f72 100755 --- a/plugins/dups +++ b/plugins/dups @@ -58,10 +58,10 @@ read -r force if [ "$force" = "f" ]; then #shellcheck disable=SC2016 - sed -E "$sedcmd" "$tmpfile" | tr '\n' '\0' | xargs -0 sh -c 'rm -f "$0" "$@" </dev/tty' + sed -E "$sedcmd" "$tmpfile" | tr '\n' '\0' | xargs -0 -r sh -c 'rm -f "$0" "$@" </dev/tty' else #shellcheck disable=SC2016 - sed -E "$sedcmd" "$tmpfile" | tr '\n' '\0' | xargs -0 sh -c 'rm -i "$0" "$@" </dev/tty' + sed -E "$sedcmd" "$tmpfile" | tr '\n' '\0' | xargs -0 -r sh -c 'rm -i "$0" "$@" </dev/tty' fi rm "$tmpfile" |