aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xaddpass4
-rwxr-xr-xrofi-pass4
2 files changed, 6 insertions, 2 deletions
diff --git a/addpass b/addpass
index 2d0f82f..a941d54 100755
--- a/addpass
+++ b/addpass
@@ -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
diff --git a/rofi-pass b/rofi-pass
index 3c10c17..2dcd45e 100755
--- a/rofi-pass
+++ b/rofi-pass
@@ -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