главная|main page

состояние|status

блог|blog

файлы|files

программы|software

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTessaLation <jakimfett@assorted.tech>2024-11-03 20:00:13 -0800
committerTessaLation <jakimfett@assorted.tech>2024-11-03 20:00:13 -0800
commit23651a6d94a0ab4d6bcbeb3338e036ab856c41d8 (patch)
tree61f87f60783e270b701e495c84d2351d2f2a68ec
parentaaf0280b43b23e0c2fbe91e3db86d1d5b7c536fe (diff)
parent18e595bb499faf2589c1f8594234d79e159868c6 (diff)
Merge remote-tracking branch 'trash/option_trash_post'
-rwxr-xr-xbb.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/bb.sh b/bb.sh
index 6beda86..b041a5e 100755
--- a/bb.sh
+++ b/bb.sh
@@ -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