BIG UPDATE: zsh: moved lots of things out of the zshrc
This commit is contained in:
parent
a96c4215ed
commit
1eae827160
4 changed files with 81 additions and 61 deletions
13
.config/shell/functions/mkcd
Normal file
13
.config/shell/functions/mkcd
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
# make a directory and cd into it
|
||||
mkcd() {
|
||||
mkdir -p "$1" || error "$0" $LINENO
|
||||
cd "$1" || error "$0" $LINENO
|
||||
}
|
||||
|
||||
error() {
|
||||
ERROR_CODE="$?"
|
||||
>&2 echo "($1) An error occurred on line number $2"
|
||||
return $ERROR_CODE
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue