a,sd,x,..,...

This commit is contained in:
Marc Beninca 2024-11-16 14:58:58 +01:00
parent e73163d2d3
commit 95f52f32eb
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -1,32 +1,27 @@
# change current directory to its parent
alias ..="\
cd \
.. \
"
# change current directory to its parent’s parent
alias ...="\
cd \
../.. \
"
# shorten alias
alias a="\
alias \
"
a() {
alias \
"${@}"
}
# swap directory (current ↔ previous)
alias sd="\
cd \
- \
"
# import source file
alias src="\
. \
"
sd() {
cd - || return
}
# exit terminal
alias x="\
exit \
"
x() {
exit \
"${@}"
}
# back
# shellcheck disable=SC3033
..() {
cd ..
}
# shellcheck disable=SC3033
...() {
cd ../..
}