summaryrefslogtreecommitdiff
path: root/angou
diff options
context:
space:
mode:
Diffstat (limited to 'angou')
-rwxr-xr-xangou4
1 files changed, 2 insertions, 2 deletions
diff --git a/angou b/angou
index b7427ba..96a2c88 100755
--- a/angou
+++ b/angou
@@ -15,7 +15,7 @@ GPG_ID="$(cat .gpg-id)"
15 15
16# decrypt and print a password from ANGOU_DIR or print the directory structure 16# decrypt and print a password from ANGOU_DIR or print the directory structure
17view() { 17view() {
18 if [ -f "${1%%.gpg}" ]; then 18 if [ -f "${1%%.gpg}".gpg ]; then
19 gpg -qd "${1%%.gpg}".gpg 19 gpg -qd "${1%%.gpg}".gpg
20 elif [ -d "${1:-.}" ]; then 20 elif [ -d "${1:-.}" ]; then
21 tree "${1:-.}" 21 tree "${1:-.}"
@@ -27,7 +27,7 @@ view() {
27 27
28# copy the first line from view to clipboard 28# copy the first line from view to clipboard
29copy() { 29copy() {
30 [ ! -f "$1" ] && usage && exit 30 [ ! -f "${1%%.gpg}".gpg ] && usage && exit
31 31
32 view "$1" | sed 1q | $ANGOU_CLIPBOARD 32 view "$1" | sed 1q | $ANGOU_CLIPBOARD
33} 33}