a,sd,x,..,...
This commit is contained in:
parent
e73163d2d3
commit
95f52f32eb
1 changed files with 22 additions and 27 deletions
|
@ -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="\
|
||||
a() {
|
||||
alias \
|
||||
"
|
||||
"${@}"
|
||||
}
|
||||
|
||||
# swap directory (current ↔ previous)
|
||||
alias sd="\
|
||||
cd \
|
||||
- \
|
||||
"
|
||||
|
||||
# import source file
|
||||
alias src="\
|
||||
. \
|
||||
"
|
||||
sd() {
|
||||
cd - || return
|
||||
}
|
||||
|
||||
# exit terminal
|
||||
alias x="\
|
||||
x() {
|
||||
exit \
|
||||
"
|
||||
"${@}"
|
||||
}
|
||||
|
||||
# back
|
||||
|
||||
# shellcheck disable=SC3033
|
||||
..() {
|
||||
cd ..
|
||||
}
|
||||
# shellcheck disable=SC3033
|
||||
...() {
|
||||
cd ../..
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue