summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-06-27 18:35:31 +0200
committerxengineering <me@xengineering.eu>2024-06-27 18:35:31 +0200
commit9c311b0ebbf182476eb371ceb431ecf33022fa31 (patch)
tree09242b87fd121588d06bf47a0512a90eb849bbdf
parent413f15d2bdcdecc7945483ad2dc018019b4452d4 (diff)
downloaddotfiles-9c311b0ebbf182476eb371ceb431ecf33022fa31.tar
dotfiles-9c311b0ebbf182476eb371ceb431ecf33022fa31.tar.zst
dotfiles-9c311b0ebbf182476eb371ceb431ecf33022fa31.zip
bash: Move aliases to posix-shell/aliases.sh
The new posix-shell folder should contain shell code which is portable between different implementations.
-rw-r--r--.bashrc31
-rw-r--r--posix-shell/aliases.sh31
2 files changed, 33 insertions, 29 deletions
diff --git a/.bashrc b/.bashrc
index 0bfc279..23c2f6c 100644
--- a/.bashrc
+++ b/.bashrc
@@ -30,35 +30,8 @@ swaylock
vdirsyncer
'
-# alias definitions
-alias ls='ls --color=auto'
-alias ll='ls -alF'
-alias la='ls -A'
-alias l='ls -CF'
-alias ip='ip --color=auto'
-alias gitstat='git status'
-alias igit='git log --all --oneline --decorate --graph'
-alias horizons='telnet horizons.jpl.nasa.gov 6775' # a NASA server providing data about planet positions and velocities
-alias wlrecord='wf-recorder -a -g "$(slurp)"'
-alias ranger='ranger --choosedir=$HOME/.local/share/ranger/lastdir && cd "$(cat $HOME/.local/share/ranger/lastdir)"'
-alias lf='lf -last-dir-path=$HOME/.local/share/lf/lastdir && cd "$(cat $HOME/.local/share/lf/lastdir)"'
-alias music="cd ~/music && ranger || echo '~/music does not exist'"
-alias bt="bluetoothctl"
-alias ikhal="ikhal; clear"
-alias news="newsboat"
-if command -v apt > /dev/null # ugly hack to detect Debian
-then
- alias t="todo-txt"
-fi
-if command -v pacman > /dev/null # ugly hack to detect Arch Linux
-then
- alias t="todo.sh"
-fi
-function my_xdg_open() { nohup xdg-open "$1" > /dev/null 2>&1 & }
-alias open=my_xdg_open
-alias note='"${EDITOR}" "$(mktemp)"'
-alias nolink='cd $(pwd -P)'
-alias zephyr='export ZEPHYR_BASE="${HOME}/zephyrproject/zephyr" && source "${HOME}/zephyrproject/.venv/bin/activate"'
+# shellcheck source=posix-shell/aliases.sh
+. "${HOME}/.config/posix-shell/aliases.sh"
# extend PATH by custom scripts (location based on XDG)
diff --git a/posix-shell/aliases.sh b/posix-shell/aliases.sh
new file mode 100644
index 0000000..3416a88
--- /dev/null
+++ b/posix-shell/aliases.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+
+alias ls='ls --color=auto'
+alias ll='ls -alF'
+alias la='ls -A'
+alias l='ls -CF'
+alias ip='ip --color=auto'
+alias gitstat='git status'
+alias igit='git log --all --oneline --decorate --graph'
+alias horizons='telnet horizons.jpl.nasa.gov 6775' # a NASA server providing data about planet positions and velocities
+alias wlrecord='wf-recorder -a -g "$(slurp)"'
+alias ranger='ranger --choosedir=$HOME/.local/share/ranger/lastdir && cd "$(cat $HOME/.local/share/ranger/lastdir)"'
+alias lf='lf -last-dir-path=$HOME/.local/share/lf/lastdir && cd "$(cat $HOME/.local/share/lf/lastdir)"'
+alias music="cd ~/music && ranger || echo '~/music does not exist'"
+alias bt="bluetoothctl"
+alias ikhal="ikhal; clear"
+alias news="newsboat"
+if command -v apt > /dev/null # ugly hack to detect Debian
+then
+ alias t="todo-txt"
+fi
+if command -v pacman > /dev/null # ugly hack to detect Arch Linux
+then
+ alias t="todo.sh"
+fi
+function my_xdg_open() { nohup xdg-open "$1" > /dev/null 2>&1 & }
+alias open=my_xdg_open
+alias note='"${EDITOR}" "$(mktemp)"'
+alias nolink='cd $(pwd -P)'
+alias zephyr='export ZEPHYR_BASE="${HOME}/zephyrproject/zephyr" && source "${HOME}/zephyrproject/.venv/bin/activate"'