shell/shortcuts

This commit is contained in:
Marc Beninca 2025-07-07 23:44:45 +02:00
parent 24a931cbfc
commit 51cb88d0d3
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 26 additions and 18 deletions

View file

@ -1,18 +0,0 @@
# shorten alias
a() {
alias \
"${@}"
}
# swap directory (current ↔ previous)
sd() {
cd \
- ||
return
}
# exit terminal
x() {
exit \
"${@}"
}

View file

@ -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 │
# ╰───────┴──────╯