Added mkcd to make a dir and quickly enter it
This commit is contained in:
parent
2788e0770e
commit
d10cdf555a
|
@ -0,0 +1,10 @@
|
|||
mkcd() {
|
||||
if [[ -v 2 ]]; then
|
||||
echo "E: mkcd accepts only one argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2164
|
||||
mkdir -pv "$1" && cd "$1"
|
||||
echo "cd: $(pwd)"
|
||||
}
|
Loading…
Reference in New Issue