summaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/aqry15
1 files changed, 15 insertions, 0 deletions
diff --git a/.local/bin/aqry b/.local/bin/aqry
new file mode 100755
index 0000000..6daef5d
--- /dev/null
+++ b/.local/bin/aqry
@@ -0,0 +1,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"