diff options
author | TessaLation <jakimfett@assorted.tech> | 2024-11-03 20:00:13 -0800 |
---|---|---|
committer | TessaLation <jakimfett@assorted.tech> | 2024-11-03 20:00:13 -0800 |
commit | 23651a6d94a0ab4d6bcbeb3338e036ab856c41d8 (patch) | |
tree | 61f87f60783e270b701e495c84d2351d2f2a68ec | |
parent | aaf0280b43b23e0c2fbe91e3db86d1d5b7c536fe (diff) | |
parent | 18e595bb499faf2589c1f8594234d79e159868c6 (diff) |
Merge remote-tracking branch 'trash/option_trash_post'
-rwxr-xr-x | bb.sh | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -642,6 +642,17 @@ EOF echo "Saved your draft as '$draft'" exit fi + + if [[ $post_status == t || $post_status == T ]]; then + echo "Are you sure to trash the post? It will not be saved anywhere." + echo "If and only if you are sure to trash this post, type \"YES\"" + read -r really_trash + if [[ $really_trash == 'YES' ]]; then + delete_includes + rm "$filename" + rm "$TMPFILE" + fi + fi done if [[ $fmt == md && -n $save_markdown ]]; then |