mkcd: Return from function on failure instead of calling false

This commit is contained in:
Eric Torres 2023-11-01 15:31:35 -07:00
parent d6969d8505
commit c8408f0dd7
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}" || false
cd "${1}" || return
}
autoload -Uz mkcd

View File

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