From 2d1fc15a71380f7fdffaa1f62c942f6d68578873 Mon Sep 17 00:00:00 2001 From: Rasmus Steinke Date: Sat, 14 Nov 2015 05:40:25 +0100 Subject: [PATCH] add password to list of available fields --- rofi-pass | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/rofi-pass b/rofi-pass index 9ae3269..1468813 100755 --- a/rofi-pass +++ b/rofi-pass @@ -215,15 +215,19 @@ else unset help; mainMenu; fi } typeMenu () { - typefield=$(pass "${selected_password}" | awk -F ':' '{ print $1 }' | grep -Ev '\-\-\-' | tail -n +2 | rofi -dmenu -p "Choose Field to type > ") - if [[ $typefield == "" ]]; then exit; fi - typeField + 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; + else typeField + fi } copyMenu () { - copyfield=$(pass "${selected_password}" | awk -F ':' '{ print $1 }' | grep -Ev '\-\-\-' | tail -n +2 | rofi -dmenu -p "Choose Field to type > ") - if [[ $copyfield == "" ]]; then exit; fi - copyField + 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; + else copyField + fi } actionMenu () {