diff options
Diffstat (limited to '.profile')
-rw-r--r-- | .profile | 47 |
1 files changed, 22 insertions, 25 deletions
@@ -18,38 +18,35 @@ do done export PATH - export XDG_CONFIG_HOME="$HOME/.config/" export XDG_CACHE_HOME="$HOME/.cache/" export XDG_DATA_HOME="$HOME/.local/share" export XDG_STATE_HOME="$HOME/.local/state/" -if command -v nvim > /dev/null -then - export VISUAL=nvim -elif command -v vim > /dev/null -then - export VISUAL=vim -elif command -v vi > /dev/null -then - export VISUAL=vi -fi +for i in nvim vim vi +do + if command -v "$i" > /dev/null + then + export VISUAL="$i" + break + fi +done -if command -v ex > /dev/null -then - export EDITOR=nvim -elif command -v ed > /dev/null -then - export EDITOR=vim -fi +for i in ex ed +do + if command -v "$i" > /dev/null + then + export EDITOR=$i + fi +done -if command -v less > /dev/null -then - export PAGER=less -elif command -v more > /dev/null -then - export PAGER=more -fi +for i in less more +do + if command -v "$i" > /dev/null + then + export PAGER=less + fi +done if test -f "$HOME"/.cargo/env then |