diff options
author | Alexey Shpakovsky <alexey@shpakovsky.ru> | 2014-03-22 15:51:55 +0100 |
---|---|---|
committer | Alexey Shpakovsky <alexey@shpakovsky.ru> | 2014-03-22 15:51:55 +0100 |
commit | 49285d02b8298c7c34bdb97d32c73e4d6c6266ac (patch) | |
tree | 70a70d9c7bbbbb98a7d7785df92379ad6f1bd3b7 | |
parent | f3fa14dc5a737bd0c0424e21e9dc1df1c2e20210 (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-x | bb.sh | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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 |