X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc;h=85583fe0901ebf47334755be6ef47b9476589efb;hb=4da3435e0d1918d90f59043deff2dffbdbe172c2;hp=1539a767e0aaec91969f25b49234eb1dbc40b503;hpb=65d1dda5c1e79aa9c85a2d16bdd1a12413f163af;p=distro-setup diff --git a/brc b/brc index 1539a76..85583fe 100644 --- a/brc +++ b/brc @@ -279,6 +279,15 @@ mysrc() { mysrc /a/bin/small-misc-bash/ll-function mysrc /a/bin/distro-functions/src/package-manager-abstractions +# things to remember: +# ALT-C - cd into the selected directory +# CTRL-T - Paste the selected file path into the command line +# +# good guide to some of its basic features is the readme file +# https://github.com/junegunn/fzf +if [[ -s /usr/share/doc/fzf/examples/key-bindings.bash ]]; then + source /usr/share/doc/fzf/examples/key-bindings.bash +fi # * functions @@ -1100,6 +1109,17 @@ econfdev() { update-exim4.conf -d /tmp/edev/etc/exim4 -o /tmp/edev/e.conf } +# exim grep in +# show important information about incoming mail in the exim log +egrin() { + sed -rn '/testignore|jtuttle|eximbackup/!s/^[^ ]+ ([^ ]+) [^ ]+ [^ ]+ <= ([^ ]+).*T="(.*)" from (<[^ ]+> .*$)/\1 \4\n \3/p' <${1:-/var/log/exim4/mainlog} +} + +# 2nd line is message-id: +egrinid() { + sed -rn '/testignore|jtuttle|eximbackup/!s/^[^ ]+ ([^ ]+) [^ ]+ [^ ]+ <= ([^ ]+).* id=([^ ]+) T="(.*)" from (<[^ ]+> .*$)/\1 \5\n \3\n \4/p' <${1:-/var/log/exim4/mainlog} +} +