add exceptions for AddEntry

This commit is contained in:
Rasmus Steinke 2015-11-14 05:44:18 +01:00
parent 2d1fc15a71
commit 6ba678b85d

View File

@ -34,7 +34,6 @@ checkIfPass () {
autopass () {
checkIfPass
if [[ ${selected_password} == "[ Add Entry ]>" ]]; then insertPass;
elif [[ ${selected_password} == "---" ]]; then mainMenu;
else
@ -215,6 +214,7 @@ else unset help; mainMenu; fi
}
typeMenu () {
checkIfPass
typefield=$(echo -e "password\n$(pass ${selected_password} | awk -F ':' '{ print $1 }' | grep -Ev '\-\-\-' | tail -n +2)" | rofi -dmenu -p "Choose Field to type > ")
if [[ $typefield == "" ]]; then exit;
elif [[ $typefield == "password" ]]; then typePass;
@ -223,6 +223,7 @@ typeMenu () {
}
copyMenu () {
checkIfPass
copyfield=$(echo -e "password\n$(pass ${selected_password} | awk -F ':' '{ print $1 }' | grep -Ev '\-\-\-' | tail -n +2)" | rofi -dmenu -p "Choose Field to type > ")
if [[ $copyfield == "" ]]; then exit;
elif [[ $copyfield == "password" ]]; then copyPass;
@ -231,6 +232,7 @@ copyMenu () {
}
actionMenu () {
checkIfPass
action=$(echo -e "1 Move Password File\n2 Delete Password File\n3 Generate New Password" | rofi -dmenu -p "Choose Action > ")
if [[ ${action} == "1 Move Password File" ]]; then manageEntry move;
elif [[ ${action} == "2 Delete Password File" ]]; then manageEntry delete;