From 51cb88d0d3d77514ca8cdf3d2093c21c78fea6ad Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 7 Jul 2025 23:44:45 +0200 Subject: [PATCH] shell/shortcuts --- sh/alias/shell.sh | 18 ------------------ sh/shell/0.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 18 deletions(-) delete mode 100644 sh/alias/shell.sh diff --git a/sh/alias/shell.sh b/sh/alias/shell.sh deleted file mode 100644 index f216c92..0000000 --- a/sh/alias/shell.sh +++ /dev/null @@ -1,18 +0,0 @@ -# shorten alias -a() { - alias \ - "${@}" -} - -# swap directory (current ↔ previous) -sd() { - cd \ - - || - return -} - -# exit terminal -x() { - exit \ - "${@}" -} diff --git a/sh/shell/0.sh b/sh/shell/0.sh index c52639b..ed847cb 100644 --- a/sh/shell/0.sh +++ b/sh/shell/0.sh @@ -130,6 +130,32 @@ rwx_shell_prompt() { printf "%b" "${view}" } +# ╭───────┬───────────╮ +# │ shell │ shortcuts │ +# ╰───────┴───────────╯ + +# shorten alias +#= a +rwx_shell_alias() { + alias \ + "${@}" +} + +# swap directory (current ↔ previous) +#= sd +rwx_shell_swap_directory() { + cd \ + - || + return +} + +# exit terminal +#= x +rwx_shell_exit() { + exit \ + "${@}" +} + # ╭───────┬──────╮ # │ shell │ main │ # ╰───────┴──────╯