aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-11-10 00:36:16 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-11-10 00:36:16 +0530
commit1418ecde0dc28dc7d32a9ffdcf0721db7bd2d624 (patch)
treeebd721f0d4421ef8624193950c782f91612b3958
parent8b9e0edc94ab6e35df0598d4008f72a92db9d868 (diff)
downloadnnn-1418ecde0dc28dc7d32a9ffdcf0721db7bd2d624.tar.gz
Skip rm invocation when no files to delete
-rwxr-xr-xplugins/dups4
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"