diff options
Diffstat (limited to '.local/bin/aqry')
-rwxr-xr-x | .local/bin/aqry | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/.local/bin/aqry b/.local/bin/aqry index 6daef5d..38c70f3 100755 --- a/.local/bin/aqry +++ b/.local/bin/aqry @@ -1,15 +1,13 @@ -#!/bin/sh +#!/usr/local/bin/andy -set -e +set ADDR_FILE $(XDG_CONFIG_HOME:$HOME/.config)/aerc/addresses -readonly ADDR_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/aerc/addresses" +awk -v qry=$args[1] ' + BEGIN { + FS = "\t" + } -awk -v qry="$1" ' -BEGIN { - FS = "\t" -} - -$1 ~ qry { - printf "%s\t%s\n", $2, $1 -} -' "$ADDR_FILE" + $1 ~ qry { + printf "%s\t%s\n", $2, $1 + } +' $ADDR_FILE |