add proper exceptions for --name
This commit is contained in:
parent
19c4a026c4
commit
a591211f7c
7
addpass
7
addpass
@ -12,8 +12,6 @@ else
|
|||||||
root="$HOME/.password-store"
|
root="$HOME/.password-store"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
Name="$2"
|
|
||||||
|
|
||||||
if [[ $1 == "--help" || $1 == "=h" ]]; then
|
if [[ $1 == "--help" || $1 == "=h" ]]; then
|
||||||
echo "add pass files for rofi-pass"
|
echo "add pass files for rofi-pass"
|
||||||
echo "(C) 2015 Rasmus Steinke <rasi at xssn dot at>"
|
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\""
|
echo "addpass --name \"my password file\" --root \"$HOME/passwords\" +user \"Richard\" +foo \"bar\" +autotype \"foo :tab user :tab pass\""
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
if [[ $* != *"--name "* ]]; then
|
echo "$1"
|
||||||
|
if [[ $1 != "--name" ]]; then
|
||||||
echo "Missing --name option. Try --help"
|
echo "Missing --name option. Try --help"
|
||||||
exit
|
exit
|
||||||
|
elif [[ $1 == "--name" ]]; then
|
||||||
|
Name="$2"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user