aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/getplugs
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/getplugs')
-rwxr-xr-xplugins/getplugs16
1 files changed, 10 insertions, 6 deletions
diff --git a/plugins/getplugs b/plugins/getplugs
index 169c4aa..5cda1ab 100755
--- a/plugins/getplugs
+++ b/plugins/getplugs
@@ -8,17 +8,21 @@
CONFIG_DIR=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/
PLUGIN_DIR=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins
-is_cmd_exists () {
- which "$1" > /dev/null 2>&1
- echo $?
-}
+# is_cmd_exists () {
+# which "$1" > /dev/null 2>&1
+# echo $?
+# }
merge () {
- vimdiff +0 "$1" "$2"
+ if which nvim >/dev/null 2>&1; then
+ nvim -d "$1" "$2"
+ else
+ vimdiff +0 "$1" "$2"
+ fi
}
prompt () {
- printf "%s" "Plugin $1 already exists and is different.\n"
+ printf "%s\n" "Plugin $1 already exists and is different."
printf "Keep (k), merge (m), overwrite (o) [default: k]? "
read -r operation