diff options
author | Gergely Risko <errge@nilcons.com> | 2017-10-18 20:21:30 +0200 |
---|---|---|
committer | Gergely Risko <errge@nilcons.com> | 2017-10-25 20:32:00 +0200 |
commit | 751c61471185a38adabc719c068ed22e64389733 (patch) | |
tree | 4c5e74ad865dce57b7c286b8f9b7dc0ef65ea859 | |
parent | 58f41970c33f5a5f988a3b1ea84b65e463cf529e (diff) | |
download | rofi-pass-751c61471185a38adabc719c068ed22e64389733.tar.gz |
Sort autotype to be always the first entry in type menu
-rwxr-xr-x | rofi-pass | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |