Hi all,
I often use pacdiff tool for updating config files. And I find it very
inconvenient that after viewing files in vimdiff, I have the only choice
to delete pacfile. It would be more useful to ask user what to do next
with standard set of choices (view, skip, remove, overwrite).
One line patch is attached.
Kind regards, Vasiliy.
>From fe00183360228109e85571bfea8254e32291cb43 Mon Sep 17 00:00:00 2001
From: Vasiliy Korchagin <[email protected]>
Date: Sat, 16 Nov 2013 13:06:29 +0400
Subject: [PATCH] pacdiff: do not remove pacfile after viewing, but ask user
---
contrib/pacdiff.sh.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/pacdiff.sh.in b/contrib/pacdiff.sh.in
index 1bad0e4..563e84b 100644
--- a/contrib/pacdiff.sh.in
+++ b/contrib/pacdiff.sh.in
@@ -178,7 +178,7 @@ while IFS= read -u 3 -r -d '' pacfile; do
o|O) mv -v "$pacfile" "$file"; break ;;
v|V)
$diffprog "$pacfile" "$file"
- rm -iv "$pacfile"; break ;;
+ ask "What's next? [v/s/r/o/q] "; continue ;;
s|S) break ;;
*) ask "Invalid answer. Try again: [v/s/r/o/q] "; continue ;;
esac
--
1.8.4.2