diff --git a/cd.sh b/cd.sh index 9445890..1fda11b 100644 --- a/cd.sh +++ b/cd.sh @@ -657,9 +657,10 @@ cd_ls () { } cd_mkdir () { - if [ "${1}" ] ; then - echo "→ ${1}" - mkdir --parents "${1}" || exit + cd_mkdir__path="${1}" + if [ "${cd_mkdir__path}" ] ; then + echo "→ ${cd_mkdir__path}" + mkdir --parents "${cd_mkdir__path}" || exit fi }