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:
parent
45e1a8bb2f
commit
2ac6842720
1 changed files with 5 additions and 0 deletions
|
@ -40,6 +40,11 @@ alias ...="cd ../.."
|
|||
alias ~="cd ~"
|
||||
|
||||
alias md="mkdir -p"
|
||||
mcd() {
|
||||
mkdir -p "$@"
|
||||
cd "$1" || exit 1
|
||||
}
|
||||
|
||||
|
||||
# clear my screen
|
||||
alias cl="clear"
|
||||
|
|
Loading…
Reference in a new issue