commit 9b30d22f2493c4b02612b6b4859fdc126af2728c
parent 84cbf259581bcb1183a1c3b9946e04543155c0dc
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Sun, 20 Jan 2019 15:59:41 +0100
Send result to stdout
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/links/bin/contactmenu b/links/bin/contactmenu
@@ -1,15 +1,14 @@
#!/usr/bin/env bash
+set -e
shopt -s nullglob globstar
contact_files=~/.mutt/aliases
contact=$(cat "${contact_files[@]}" | awk '{ print $2 }'| dmenu_themed -i "$@")
-
[[ -n $contact ]] || exit 0
email=$(cat "${contact_files[@]}" | grep "$contact " | grep "@" | sed 's/.*<//;s/>.*//')
echo "$email" | xclip
-
-
+echo "$email"