From: Silvio Rhatto Date: Wed, 21 Aug 2019 22:46:52 +0000 (-0300) Subject: Adds suffix param for mkday and mkmonth X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=d18a0f5033fa2aa6b47f75f30d48a4ef92e59e51;p=rhatto%2Fdotfiles%2Fprofile.git Adds suffix param for mkday and mkmonth --- diff --git a/profile.dot.link b/profile.dot.link index 4ba8466..80137f3 100644 --- a/profile.dot.link +++ b/profile.dot.link @@ -130,11 +130,25 @@ scd() { } mkday() { - mkdir `today` && cd `today` + suffix="$1" + folder="`today`" + + if [ ! -z "$suffix" ]; then + folder="$folder-$suffix" + fi + + mkdir $folder && cd $folder } mkmonth() { - mkdir `month` && cd `month` + suffix="$1" + folder="`month`" + + if [ ! -z "$suffix" ]; then + folder="$folder-$suffix" + fi + + mkdir $folder && cd $folder } mkcd() {