git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/.bash/aliases.bash
diff options
context:
space:
mode:
Diffstat (limited to '.bash/aliases.bash')
-rw-r--r--.bash/aliases.bash45
1 files changed, 41 insertions, 4 deletions
diff --git a/.bash/aliases.bash b/.bash/aliases.bash
index bcdfae2..dff312a 100644
--- a/.bash/aliases.bash
+++ b/.bash/aliases.bash
@@ -6,8 +6,25 @@
if [ "$TERM" != "dumb" ];then
eval "$(dircolors -b)"
alias ls="ls --color=auto"
- alias grep="grep --color=auto"
- alias egrep="egrep --color=auto"
+ case "$OSNAME" in
+ 'sunos') ;;
+ *)
+ alias grep="grep --color=auto"
+ alias egrep="egrep --color=auto"
+ ;;
+ esac
+fi
+# shellcheck disable=SC2139
+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"'
@@ -15,7 +32,7 @@ alias pip-update="sudo pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xa
alias matrix='cmatrix -sbu6 -C cyan'
alias tbc='tbclock -e -H2 -M7 -S3'
command -v colordiff >/dev/null 2>&1&&alias diff="colordiff"
-command -v colormake >/dev/null 2>&1&&alias make="colormake"
+#command -v colormake >/dev/null 2>&1&&alias make="colormake"
alias perllint="perl -Mstrict -Mdiagnostics -cw"
alias scredit='gimp "${SCRSHDIR}/$(ls -rt1 $SCRSHDIR/|tail -n1)"'
alias scrview='pqiv -i "${SCRSHDIR}/$(ls -rt1 $SCRSHDIR/|tail -n1)"'
@@ -93,7 +110,9 @@ xstat() {
done
}
# ----- PACKAGE MANAGERS ----- #
-if [ -x "/usr/bin/pikaur" ];then
+if [ -x "/usr/bin/paru" ];then
+ alias pkgclean="paru --noconfirm -Sc"
+elif [ -x "/usr/bin/pikaur" ];then
alias pkgclean="pikaur --noconfirm -Sc"
elif [ -x "/usr/bin/pacman" ];then
alias pkgclean="/usr/bin/sudo /usr/bin/pacman --noconfirm -Sc"
@@ -162,6 +181,7 @@ alias certshow="certmgr -L -n"
# ----- APPLICATION CONTROL ----- #
alias browser-set='xdg-settings set default-web-browser'
alias browser-get='xdg-settings get default-web-browser'
+alias default-desktop-apps="editor ~/.config/mimeapps.list"
# ----- CONTAINERS ----- #
if command -v podman >/dev/null;then
alias pcl="podman container list"
@@ -187,12 +207,29 @@ if command -v podman >/dev/null;then
alias pnd="podman network disconnect"
alias ppd="podman pod stop"
fi
+# ----- PUPPET + RUBY ----- #
+# ...yeah, I'm mostly doing ruby stuff for Puppet, erm I mean
+# OpenVox (now that Perforce have turned the Puppet world to a burning heap of garbage)
+alias bake="bundle exec rake"
+# ----- OTHER STUFF ----- #
for cmmd in batcat bat; do
if command -v "$cmmd" > /dev/null; then
# shellcheck disable=SC2139
alias cat="${cmmd} --tabs 4 --wrap never --paging never --style 'plain,rule'"
+ # shellcheck disable=SC2139
+ alias less="${cmmd} --tabs 4 --wrap never --paging always --style 'plain,rule'"
+ alias plain-cat='/usr/bin/cat'
+ alias plc='/usr/bin/cat'
+ alias plain-less='/usr/bin/less'
+ alias pll='/usr/bin/less'
export MANPAGER="sh -c 'col -bx | ${cmmd} -l man -p'"
export MANROFFOPT="-c"
break
fi
done
+# Flake8. Nice linter, but...
+# They kneeled to USER STUPIDITY when it comes to configuration. Wut?
+# https://flake8.pycqa.org/en/latest/release-notes/4.0.0.html#backwards-incompatible-changes
+# --> https://github.com/pycqa/flake8/pull/1404
+# Users were confused, so ~/.config/flake8 is not supported anymore. lelkek.
+alias flake8='flake8 --config ${HOME}/.config/flake8'