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" }