diff options
-rwxr-xr-x | addpass | 4 | ||||
-rwxr-xr-x | rofi-pass | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -58,8 +58,10 @@ printEntry () { done } -if [[ "$group" == "No Group" || "$group" == "" ]]; then +if [[ "$group" == "No Group" ]]; then printEntry | PASSWORD_STORE_DIR="${root}" pass insert -m "${Name}" +elif [[ "$group" == "" ]]; then + exit else printEntry | PASSWORD_STORE_DIR="${root}" pass insert -m "${group}/${Name}" fi @@ -304,8 +304,10 @@ insertPass () { elif [[ $insertmenu == "* Accept Values and Add Password Entry" ]]; then cd "${root}" group=$(echo -e "No Group\n---\n$(find -type d -not -iwholename '*.git*' -printf '%d\t%P\n' | sort -r -nk1 | cut -f2-)" | _rofi -dmenu -p "Choose Group > ") - if [[ "$group" == "No Group" || "$group" == "" ]]; then + if [[ "$group" == "No Group" ]]; then PASSWORD_STORE_DIR="${root}" pass insert -m -f "${name}" < <(echo -e "${pass}\nUserName: ${user}\n---\n${URL_field}: ${domain}") + elif [[ "$group" == "" ]]; then + exit else PASSWORD_STORE_DIR="${root}" pass insert -m -f "${group}/${name}" < <(echo -e "${pass}\nUserName: ${user}\n---\n${URL_field}: ${domain}") fi |