From 953fb8103210ec508f4b5a20bad5e9ed8088bf71 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 8 Jun 2024 12:37:06 +0200 Subject: [PATCH] cd_mkdir --- cd.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 }