dotfiles-ansible/roles/scripts/files/bin/abook-aerc

19 lines
480 B
Bash
Executable File

#!/bin/sh
: "${ADDRESS_BOOK=$HOME/.abook/addressbook}"
# $* concanates arguments with the 1st character of $IFS
#
# NOTE: in aerc's compose tab
# Tab is used to move to the next header field / completion item
# Enter does nothing other than selecting the completion item
#
# hence forcing $IFS to be a Space here
oldIFS="$IFS"
IFS=" "
abook --convert --infile "${ADDRESS_BOOK}" --outformat muttq | tail -n +2 | fzf --filter="$*"
# Reset $IFS back to the default
IFS="$oldIFS"