diff dot_bashrc @ 491:f1d1eab204aa

Fix paths to nvim for SUDO_EDITOR
author zegervdv <zegervdv@me.com>
date Sat, 27 Nov 2021 16:00:20 +0100
parents f49b0b91925c
children 1403bfc694e4
line wrap: on
line diff
--- a/dot_bashrc	Sat Nov 27 15:56:23 2021 +0100
+++ b/dot_bashrc	Sat Nov 27 16:00:20 2021 +0100
@@ -104,7 +104,6 @@
 
 export EDITOR=nvim
 export HGEDITOR=nvim
-export SUDO_EDITOR=nvim
 
 stty > /dev/null
 
@@ -136,6 +135,9 @@
 
 [ -f ~/.bashrc.local ] && source ~/.bashrc.local
 
+# Must run after local paths are added
+export SUDO_EDITOR=$(which nvim)
+
 if [ ! -f ~/.lscolors.parsed.sh ]; then
   echo 'Generating ls colors'
   dircolors --sh ~/.lscolors > ~/.lscolors.parsed.sh