summaryrefslogtreecommitdiffstats
path: root/fb.in
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-07-09 16:59:20 +0200
committerFlorian Pritz <bluewind@xinu.at>2011-08-09 14:12:37 +0200
commit33fe9846fd0eca0c452bd6966c7a270ad389dae1 (patch)
tree3f5258c5d2c0c6372698e9e74a0baf486ce646ee /fb.in
parentb5caa1c3bb8cca2c9e40fc265acea14365e332af (diff)
remove ids from the history when called with -d
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'fb.in')
-rw-r--r--fb.in7
1 files changed, 6 insertions, 1 deletions
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