diff options
author | Florian Pritz <bluewind@xinu.at> | 2011-07-09 16:59:20 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2011-08-09 14:12:37 +0200 |
commit | 33fe9846fd0eca0c452bd6966c7a270ad389dae1 (patch) | |
tree | 3f5258c5d2c0c6372698e9e74a0baf486ce646ee | |
parent | b5caa1c3bb8cca2c9e40fc265acea14365e332af (diff) |
remove ids from the history when called with -d
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r-- | fb.in | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 |