summaryrefslogtreecommitdiff
path: root/.local/bin/aqry
blob: 6daef5de1abe4bc1f59676aebc5370662eac0039 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

set -e

readonly ADDR_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/aerc/addresses"

awk -v qry="$1" '
BEGIN {
	FS = "\t"
}

$1 ~ qry {
	printf "%s\t%s\n", $2, $1
}
' "$ADDR_FILE"