aboutsummaryrefslogtreecommitdiff
path: root/lib/keyringer/functions
diff options
context:
space:
mode:
authorrhatto <rhatto@ratatosk.fluxo.info>2014-03-27 22:03:39 -0300
committerrhatto <rhatto@ratatosk.fluxo.info>2014-03-27 22:03:39 -0300
commitd6119b43f54c53d3fdffd995699337b100eee2c0 (patch)
tree8035fb337d383585dd88fc3b55de08ce12518572 /lib/keyringer/functions
parentfc9954384ee5543d742395c5b9245e83d6e9fd07 (diff)
downloadkeyringer-d6119b43f54c53d3fdffd995699337b100eee2c0.tar.gz
keyringer-d6119b43f54c53d3fdffd995699337b100eee2c0.tar.bz2
Avoid viminfo if VIM is set as $EDITOR (#50)
Diffstat (limited to 'lib/keyringer/functions')
-rwxr-xr-xlib/keyringer/functions7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/keyringer/functions b/lib/keyringer/functions
index f1af951..af300ef 100755
--- a/lib/keyringer/functions
+++ b/lib/keyringer/functions
@@ -284,6 +284,13 @@ function keyringer_set_env {
fi
fi
+ # Avoid viminfo, see https://keyringer.pw/trac/ticket/50
+ if $EDITOR --help | grep -q -e "^VIM"; then
+ if ! echo $EDITOR | grep -q -- "-i NONE"; then
+ EDITOR="$EDITOR -i NONE"
+ fi
+ fi
+
if [ ! -f "$OPTIONS" ]; then
echo "No option config was found"
exit 1