mkcd: do not exit if cd fails
This commit is contained in:
parent
fe83c16352
commit
1eb778e126
@ -2,7 +2,7 @@
|
|||||||
# Make a directory, then change into it
|
# Make a directory, then change into it
|
||||||
mkcd() {
|
mkcd() {
|
||||||
[[ ! -d "${1}" ]] && mkdir --parents -- "${1}"
|
[[ ! -d "${1}" ]] && mkdir --parents -- "${1}"
|
||||||
cd "${1}" || exit
|
cd "${1}" || false
|
||||||
}
|
}
|
||||||
|
|
||||||
autoload -Uz mkcd
|
autoload -Uz mkcd
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# Make a directory, then change into it
|
# Make a directory, then change into it
|
||||||
mkcd() {
|
mkcd() {
|
||||||
[[ ! -d "${1}" ]] && gmkdir --parents -- "${1}"
|
[[ ! -d "${1}" ]] && gmkdir --parents -- "${1}"
|
||||||
cd "${1}" || exit
|
cd "${1}" || false
|
||||||
}
|
}
|
||||||
|
|
||||||
autoload -Uz mkcd
|
autoload -Uz mkcd
|
||||||
|
Loading…
x
Reference in New Issue
Block a user