git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormail_redacted_for_web 2025-01-12 12:35:03 +0100
committermail_redacted_for_web 2025-01-12 12:35:03 +0100
commite3bed71fd7137c2d4d15e6db4e61c13f846bd62b (patch)
treefd45fc29e62552c68745ee1acdad1fa03f7aa97d
parente55e81a7157ab209d84abe15de3073b602760fff (diff)
downloaddotfiles-e3bed71fd7137c2d4d15e6db4e61c13f846bd62b.tar.bz2
Create alias "editor" for other scripts or aliases to use
-rw-r--r--.bash/aliases.bash11
1 files changed, 11 insertions, 0 deletions
diff --git a/.bash/aliases.bash b/.bash/aliases.bash
index ae3c14b..0304f11 100644
--- a/.bash/aliases.bash
+++ b/.bash/aliases.bash
@@ -9,6 +9,17 @@ if [ "$TERM" != "dumb" ];then
alias grep="grep --color=auto"
alias egrep="egrep --color=auto"
fi
+if [ -n "$EDITOR" ]; then
+ alias editor="$EDITOR"
+elif [ -n "$VISUAL" ]; then
+ alias editor="$VISUAL"
+elif [ -x "/usr/bin/vim" ]; then
+ alias editor="/usr/bin/vim"
+elif [ -x "/usr/bin/vi" ]; then
+ alias editor="/usr/bin/vi"
+else
+ alias editor="/usr/bin/edit"
+fi
alias lst="ls -l --time-style=full-iso"
alias cls=' echo -ne "\033c"'
alias pip-update="sudo pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 sudo pip install -U"