diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2020-08-28 14:20:23 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2020-08-28 14:20:23 -0300 |
commit | f4e5c6187221c41eb19ce957e9e97f5560b5bf13 (patch) | |
tree | ab4d26fa0ee296a8f19bd035c626d8cb822ba953 | |
parent | e6be12b75301162e5afd107cc3e9744c160979e2 (diff) | |
download | profile-f4e5c6187221c41eb19ce957e9e97f5560b5bf13.tar.gz profile-f4e5c6187221c41eb19ce957e9e97f5560b5bf13.tar.bz2 |
Feat: now and mknow commands
-rw-r--r-- | aliases.dot.link | 1 | ||||
-rw-r--r-- | profile.dot.link | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/aliases.dot.link b/aliases.dot.link index 3d489ae..c6f7b6c 100644 --- a/aliases.dot.link +++ b/aliases.dot.link @@ -8,6 +8,7 @@ alias music="ncmpcpp" alias mkdir="mkdir -p" alias today="date +%Y%m%d" alias month="date +%Y%m" +alias now="date +%Y%m%d%I%M%S" alias hashpw="mkpasswd -m sha-512" alias stitle="screen -X title" alias ttitle="tmux rename-window" diff --git a/profile.dot.link b/profile.dot.link index 2b502f0..81253fd 100644 --- a/profile.dot.link +++ b/profile.dot.link @@ -165,6 +165,17 @@ scd() { ttitle `basename $*` > /dev/null 2>&1 } +mknow() { + suffix="$1" + folder="`now`" + + if [ ! -z "$suffix" ]; then + folder="$folder-$suffix" + fi + + mkdir $folder && cd $folder +} + mkday() { suffix="$1" folder="`today`" |