mkcd: do not exit if cd fails

This commit is contained in:
Eric Torres 2023-10-16 13:23:59 -07:00
parent fe83c16352
commit 1eb778e126
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
# Make a directory, then change into it
mkcd() {
[[ ! -d "${1}" ]] && mkdir --parents -- "${1}"
cd "${1}" || exit
cd "${1}" || false
}
autoload -Uz mkcd

View File

@ -2,7 +2,7 @@
# Make a directory, then change into it
mkcd() {
[[ ! -d "${1}" ]] && gmkdir --parents -- "${1}"
cd "${1}" || exit
cd "${1}" || false
}
autoload -Uz mkcd