From cafa65b7cb098d4bc6ddd30e83662cabd94b6a42 Mon Sep 17 00:00:00 2001 From: Rasmus Steinke Date: Tue, 2 Jun 2015 20:08:45 +0200 Subject: [PATCH] add show entry --- rofi-pass | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rofi-pass b/rofi-pass index 4ce2af8..52c30fb 100755 --- a/rofi-pass +++ b/rofi-pass @@ -64,7 +64,7 @@ mainMenu () { root="$2" fi if [[ $1 == "manage" ]]; then - HELP="Alt+1: Edit Entry | Alt+2: Move Entry | Alt+3: Delete Entry" + HELP="Alt+1: Edit Entry | Alt+2: Move Entry | Alt+3: Delete Entry | Alt+4 Show Entry" selected_password="$(echo -e "0 Return to Main Menu\n---\n$(list_passwords 2>/dev/null)" | rofi -mesg "${HELP}" -dmenu -select "$entry" -p "rofi-pass > ")" rofi_exit=$? if [[ "${rofi_exit}" -eq 0 ]]; then true; @@ -72,6 +72,13 @@ mainMenu () { elif [[ "${rofi_exit}" -eq 11 ]]; then manageEntry move; elif [[ "${rofi_exit}" -eq 1 ]]; then exit; elif [[ "${rofi_exit}" -eq 12 ]]; then manageEntry delete; + elif [[ "${rofi_exit}" -eq 13 ]]; then + menu=$(echo -e "0 Return to Manage Menu\n---\n$(pass "$selected_password")" | rofi -dmenu -p "> ") + if [[ $menu == "0 Return to Manage Menu" ]]; then mainMenu manage + elif [[ $menu == "" ]]; then exit + else + : + fi fi if [[ "$selected_password" == "0 Return to Main Menu" ]]; then mainMenu