sh: Ensure environment editor is available
When setting the environment variable EDITOR in the shell, ensure that the editor being set is actually available: It first tries nvim, then falls back to micro, then nano (one of which really every distribution should have).
This commit is contained in:
parent
5fce112927
commit
2e6c1026fb
1 changed files with 11 additions and 1 deletions
|
@ -20,7 +20,17 @@ export LIBRARYROOT="${LIBRARYROOT:-$HOME/documents/library}"
|
|||
export BIBFILE="${BIBFILE:-$LIBRARYROOT/academia/academia.bib}"
|
||||
|
||||
# these are my personal 'important' application settings
|
||||
export EDITOR="nvim"
|
||||
if exist nvim; then
|
||||
export EDITOR="nvim"
|
||||
elif exist vim; then
|
||||
export EDITOR="vim"
|
||||
elif exist vi; then
|
||||
export EDITOR="vi"
|
||||
elif exist micro; then
|
||||
export EDITOR="micro"
|
||||
else
|
||||
export EDITOR="nano"
|
||||
fi
|
||||
export BROWSER="qutebrowser"
|
||||
export TERMINAL="wezterm"
|
||||
export PAGER="less"
|
||||
|
|
Loading…
Reference in a new issue