aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2015-11-14 05:40:25 +0100
committerRasmus Steinke <rasi@xssn.at>2015-11-14 05:40:25 +0100
commit2d1fc15a71380f7fdffaa1f62c942f6d68578873 (patch)
tree7eff9ebc1f9224b9e12e31fccd73755a613f4a00
parentba2e8fd918ba4ae036ebb8969d18e685a4c20d48 (diff)
downloadrofi-pass-2d1fc15a71380f7fdffaa1f62c942f6d68578873.tar.gz
add password to list of available fields
-rwxr-xr-xrofi-pass16
1 files 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 () {