diff options
author | Vitor Gonçalves <vitorg@tilde.team> | 2023-06-26 04:22:01 -0300 |
---|---|---|
committer | Vitor Gonçalves <vitorg@tilde.team> | 2023-06-26 04:22:01 -0300 |
commit | 8eadbb45b4c9cb04036c536e2a4dcd32dbd1e3a7 (patch) | |
tree | 85d790b5505b4d103d273b53c2304addc6cc1641 | |
parent | 6e7059129b385b0aee732960903b2faab98e167c (diff) | |
download | dots-8eadbb45b4c9cb04036c536e2a4dcd32dbd1e3a7.tar.gz |
feat: wbp now works as it is intended
-rw-r--r-- | dot_config/bash/functions | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dot_config/bash/functions b/dot_config/bash/functions index c0f45fb..2835c92 100644 --- a/dot_config/bash/functions +++ b/dot_config/bash/functions @@ -5,7 +5,9 @@ wbp() { read -rp "What is your title? " title - path="$blogdir/content/$(date '+%Y-%m-%d')-$title.md" + path="$blogdir/content/$(date '+%Y-%m-%d')-${title,,}.md" + path=${path// /-} + "$EDITOR" "$path" - clear; printf "Your blogpost is saved at $path.\n" + printf "Your blogpost is saved at %s\n" "$path" } |