From 4cd8f7ccee3f5dc85473c1d797f9d9ebf6b2872e Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 6 Nov 2023 18:14:11 +0100 Subject: aqry: Add script to query addresses for aerc --- .local/bin/aqry | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 .local/bin/aqry (limited to '.local/bin') 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" -- cgit v1.2.3