diff options
Diffstat (limited to 'angou')
| -rwxr-xr-x | angou | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -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 |
| 17 | view() { | 17 | view() { |
| 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 |
| 29 | copy() { | 29 | copy() { |
| 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 | } |
