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
|
export LANG=en_GB.UTF-8
|
||||||
|
|
||||||
# Make a sensible editor choice
|
# Make a sensible editor choice
|
||||||
if [ -x /usr/bin/nano ]; then
|
editor_preferences=(nano pico vim vi)
|
||||||
export EDITOR=nano
|
for editor in "${editor_preferences[@]}"; do
|
||||||
export VISUAL=nano
|
if [ -x "$(which $editor)" ]; then
|
||||||
else
|
export EDITOR=$editor
|
||||||
export EDITOR=vi
|
export VISUAL=$editor
|
||||||
export VISUAL=vi
|
break
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# Go stuff
|
# Go stuff
|
||||||
export GOPATH=$HOME/go/
|
export GOPATH=$HOME/go/
|
||||||
|
|||||||
Reference in New Issue
Block a user