aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGergely Risko <errge@nilcons.com>2017-10-18 20:21:30 +0200
committerGergely Risko <errge@nilcons.com>2017-10-25 20:32:00 +0200
commit751c61471185a38adabc719c068ed22e64389733 (patch)
tree4c5e74ad865dce57b7c286b8f9b7dc0ef65ea859
parent58f41970c33f5a5f988a3b1ea84b65e463cf529e (diff)
downloadrofi-pass-751c61471185a38adabc719c068ed22e64389733.tar.gz
Sort autotype to be always the first entry in type menu
-rwxr-xr-xrofi-pass4
1 files changed, 3 insertions, 1 deletions
diff --git a/rofi-pass b/rofi-pass
index 25ad9e1..b876dae 100755
--- a/rofi-pass
+++ b/rofi-pass
@@ -405,7 +405,9 @@ typeMenu () {
if [[ -n $default_do ]]; then
if [[ $default_do == "menu" ]]; then
checkIfPass
- typefield=$(printf '%s\n' "${!stuff[@]}" | sort | _rofi -dmenu -p "Choose Field to type > ")
+ local -a keys=(${!stuff[@]})
+ keys=(${keys[@]/$AUTOTYPE_field})
+ typefield=$({ echo ${AUTOTYPE_field} ; printf '%s\n' "${keys[@]}" | sort; } | _rofi -dmenu -p "Choose Field to type > ")
val=$?
if [[ $val -eq 1 ]]; then
exit