главная|main page

состояние|status

блог|blog

файлы|files

программы|software

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Shpakovsky <alexey@shpakovsky.ru>2014-03-22 15:51:55 +0100
committerAlexey Shpakovsky <alexey@shpakovsky.ru>2014-03-22 15:51:55 +0100
commit49285d02b8298c7c34bdb97d32c73e4d6c6266ac (patch)
tree70a70d9c7bbbbb98a7d7785df92379ad6f1bd3b7
parentf3fa14dc5a737bd0c0424e21e9dc1df1c2e20210 (diff)
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
-rwxr-xr-xbb.sh1
1 files changed, 1 insertions, 0 deletions
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