aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2017-10-31 19:56:24 +0100
committerRasmus Steinke <rasi@xssn.at>2017-10-31 19:56:24 +0100
commit72d895cfcd2a10ad9148efdc24645c49ad2f05e4 (patch)
tree57c5de44b377f103d4565b97ec8fb132b5499e7b
parentc29e0f064f568026be1ff5e06b68831ae3872dff (diff)
downloadrofi-pass-72d895cfcd2a10ad9148efdc24645c49ad2f05e4.tar.gz
only show help message if more than one root is specified. fixes #100
-rwxr-xr-xrofi-pass6
1 files changed, 5 insertions, 1 deletions
diff --git a/rofi-pass b/rofi-pass
index 1cd7078..3e69e5c 100755
--- a/rofi-pass
+++ b/rofi-pass
@@ -288,9 +288,13 @@ mainMenu () {
-kb-mode-previous "" # These keyboard shortcut options are needed, because
-kb-mode-next "" # Shift+<Left|Right> are otherwise taken by rofi.
-select "$entry"
- -mesg "PW Store: ${root}"
-p "> ")
+ if [[ ${#roots[@]} -ne "1" ]]
+ then
+ args+=(-mesg "PW Store: ${root}")
+ fi
+
selected_password="$(list_passwords 2>/dev/null | _rofi "${args[@]}")"
rofi_exit=$?