diff options
-rw-r--r-- | aliases.dot.link | 2 | ||||
-rw-r--r-- | profile.dot.link | 22 |
2 files changed, 24 insertions, 0 deletions
diff --git a/aliases.dot.link b/aliases.dot.link index 7045c94..09a5536 100644 --- a/aliases.dot.link +++ b/aliases.dot.link @@ -8,7 +8,9 @@ alias gvim="vim.gtk -g &> /dev/null" alias music="ncmpcpp" alias mkdir="mkdir -p" alias today="date +%Y%m%d" +alias todayiso="date --iso-8601" alias month="date +%Y%m" +alias monthiso="date +%Y-%m" alias now="date +%Y%m%d%H%M%S" alias hashpw="mkpasswd -m sha-512" alias stitle="screen -X title" diff --git a/profile.dot.link b/profile.dot.link index bc7586e..4c5c866 100644 --- a/profile.dot.link +++ b/profile.dot.link @@ -234,6 +234,17 @@ mkday() { mkdir $folder && cd $folder } +mkdayiso() { + suffix="$1" + folder="`todayiso`" + + if [ ! -z "$suffix" ]; then + folder="$folder-$suffix" + fi + + mkdir $folder && cd $folder +} + mkmonth() { suffix="$1" folder="`month`" @@ -245,6 +256,17 @@ mkmonth() { mkdir $folder && cd $folder } +mkmonthiso() { + suffix="$1" + folder="`monthiso`" + + if [ ! -z "$suffix" ]; then + folder="$folder-$suffix" + fi + + mkdir $folder && cd $folder +} + mkcd() { mkdir "$*" && cd "$*" } |