Added mkcd to make a dir and quickly enter it
This commit is contained in:
parent
2788e0770e
commit
d10cdf555a
10
.bashrc.d/mkcd.bash
Normal file
10
.bashrc.d/mkcd.bash
Normal file
@ -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…
x
Reference in New Issue
Block a user