diff options
author | Rasmus Steinke <rasi@xssn.at> | 2015-08-21 19:15:45 +0200 |
---|---|---|
committer | Rasmus Steinke <rasi@xssn.at> | 2015-08-21 19:15:45 +0200 |
commit | a591211f7c769d17edcd0302b643864c3dac78ec (patch) | |
tree | 2ea3df0b3d0c2cdd95a94066ff3d870f4d108967 | |
parent | 19c4a026c40d0706210b2ae5a699988a0e8b624d (diff) | |
download | rofi-pass-a591211f7c769d17edcd0302b643864c3dac78ec.tar.gz |
add proper exceptions for --name
-rwxr-xr-x | addpass | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -12,8 +12,6 @@ else root="$HOME/.password-store" fi -Name="$2" - if [[ $1 == "--help" || $1 == "=h" ]]; then echo "add pass files for rofi-pass" echo "(C) 2015 Rasmus Steinke <rasi at xssn dot at>" @@ -28,9 +26,12 @@ if [[ $1 == "--help" || $1 == "=h" ]]; then echo "addpass --name \"my password file\" --root \"$HOME/passwords\" +user \"Richard\" +foo \"bar\" +autotype \"foo :tab user :tab pass\"" exit else - if [[ $* != *"--name "* ]]; then + echo "$1" + if [[ $1 != "--name" ]]; then echo "Missing --name option. Try --help" exit + elif [[ $1 == "--name" ]]; then + Name="$2" fi fi |