profile: check for neovim after PATH manipulation

The reason is that neovim might be installed in one of the paths added
during the manipulation (e.g., for some reason neovim was installed
under ~/.local/bin).
This commit is contained in:
Fernando Schauenburg 2021-08-08 23:36:23 +02:00
parent cf01371f00
commit 09534e15d0

View file

@ -5,12 +5,6 @@ export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
if command -v nvim >/dev/null 2>&1; then
export EDITOR="nvim"
else
export EDITOR="vim"
fi
export INPUTRC="$XDG_CONFIG_HOME/readline/inputrc"
export LANG="en_US.UTF-8"
export LANGUAGE="en_US"
@ -58,7 +52,15 @@ export MANPATH
unset dir
# This check has to be done after PATH manipulation above so we can find brew.
# These checks habe to be done after PATH manipulation above so we can find
# installed programs if they are in the added paths.
if command -v nvim >/dev/null 2>&1; then
export EDITOR="nvim"
else
export EDITOR="vim"
fi
if command -v brew >/dev/null 2>&1; then
LOCAL_PREFIX="$(brew --prefix)"
export HOMEBREW_NO_ANALYTICS=1