---
contrib/dmenu/passmenu | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/contrib/dmenu/passmenu b/contrib/dmenu/passmenu
index 9b5239d..34653a8 100755
--- a/contrib/dmenu/passmenu
+++ b/contrib/dmenu/passmenu
@@ -2,11 +2,17 @@
shopt -s nullglob globstar
+PROGRAM="${0##*/}"
+
typeit=0
-if [[ $1 == "--type" ]]; then
- typeit=1
- shift
-fi
+
+opts="$(getopt -o "" -l typeit -n "$PROGRAM" -- "$@")"
+[[ $? -ne 0 ]] && (echo "Usage: $PROGRAM [--typeit]" >&2 ; exit 1)
+eval set -- "$opts"
+while true; do case $1 in
+ --typeit) typeit=1; shift ;;
+ --) shift; break ;;
+esac done
prefix=${PASSWORD_STORE_DIR-~/.password-store}
password_files=( "$prefix"/**/*.gpg )
--
2.4.6
_______________________________________________
Password-Store mailing list
[email protected]
http://lists.zx2c4.com/mailman/listinfo/password-store