From 49285d02b8298c7c34bdb97d32c73e4d6c6266ac Mon Sep 17 00:00:00 2001 From: Alexey Shpakovsky Date: Sat, 22 Mar 2014 15:51:55 +0100 Subject: [PATCH] rename *.md file together with *.html if called like this: bb.sh edit -n posted.md then editing title will rename posted.html to reflect new title. Now it will rename posted.md, too --- bb.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bb.sh b/bb.sh index 5d4aaa7..08c5baa 100755 --- a/bb.sh +++ b/bb.sh @@ -380,6 +380,7 @@ edit() { parse_file "$TMPFILE" "$edit_timestamp" "$filename" else parse_file "$TMPFILE" "$edit_timestamp" # this command sets $filename as the html processed file + [[ "${1##*.}" == "md" ]] && mv "$1" "${filename%%.*}.md" 2>/dev/null fi rm "$TMPFILE" fi