From c8408f0dd79597e7f4eee06d59fb1f858cbf2dca Mon Sep 17 00:00:00 2001 From: Eric Torres Date: Wed, 1 Nov 2023 15:31:35 -0700 Subject: [PATCH] mkcd: Return from function on failure instead of calling false --- zsh-linux/.config/zsh-linux/zshrc | 2 +- zsh-macos/.config/zsh-macos/zshrc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zsh-linux/.config/zsh-linux/zshrc b/zsh-linux/.config/zsh-linux/zshrc index 19c5b8e..8131285 100644 --- a/zsh-linux/.config/zsh-linux/zshrc +++ b/zsh-linux/.config/zsh-linux/zshrc @@ -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 diff --git a/zsh-macos/.config/zsh-macos/zshrc b/zsh-macos/.config/zsh-macos/zshrc index bd67991..4144748 100644 --- a/zsh-macos/.config/zsh-macos/zshrc +++ b/zsh-macos/.config/zsh-macos/zshrc @@ -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