sh: Add make-and-enter directory function

`mcd` will, similarly to `md` create a directory and all the necessary
top-level directories but, unlike `md`, afterwards also enter the
created directory for the current shell.
This commit is contained in:
Marty Oehme 2024-09-15 22:13:46 +02:00
parent 45e1a8bb2f
commit 2ac6842720
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -40,6 +40,11 @@ alias ...="cd ../.."
alias ~="cd ~" alias ~="cd ~"
alias md="mkdir -p" alias md="mkdir -p"
mcd() {
mkdir -p "$@"
cd "$1" || exit 1
}
# clear my screen # clear my screen
alias cl="clear" alias cl="clear"