mirror of
https://github.com/nikdoof/dotfiles.git
synced 2025-12-13 09:42:27 +00:00
[shell-common] Select an editor (resolves #1)
This commit is contained in:
@@ -7,13 +7,14 @@ export TZ=GB
|
||||
export LANG=en_GB.UTF-8
|
||||
|
||||
# Make a sensible editor choice
|
||||
if [ -x /usr/bin/nano ]; then
|
||||
export EDITOR=nano
|
||||
export VISUAL=nano
|
||||
else
|
||||
export EDITOR=vi
|
||||
export VISUAL=vi
|
||||
editor_preferences=(nano pico vim vi)
|
||||
for editor in "${editor_preferences[@]}"; do
|
||||
if [ -x "$(which $editor)" ]; then
|
||||
export EDITOR=$editor
|
||||
export VISUAL=$editor
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Go stuff
|
||||
export GOPATH=$HOME/go/
|
||||
|
||||
Reference in New Issue
Block a user