From 33fe9846fd0eca0c452bd6966c7a270ad389dae1 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 9 Jul 2011 16:59:20 +0200 Subject: remove ids from the history when called with -d Signed-off-by: Florian Pritz --- fb.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fb.in b/fb.in index 05ac03e..d1f80bb 100644 --- a/fb.in +++ b/fb.in @@ -172,7 +172,12 @@ if [ "$DELETE" ] || [ "$GET" ]; then for i in "$@"; do i=$(id_from_arg "$i") if [ "$DELETE" ]; then - $LIBDIR/fb-helper d "$PASTEBIN/file/delete/$i" || EXITCODE=1 + if $LIBDIR/fb-helper d "$PASTEBIN/file/delete/$i"; then + sed -i "/$i/d" $FBHIST + else + EXITCODE=1 + fi + elif [ "$GET" ]; then if [ "$COMPRESS" = "1" ]; then require_executable zcat -- cgit v1.2.3-24-g4f1b