aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2017-10-26 02:35:33 +0200
committerGitHub <noreply@github.com>2017-10-26 02:35:33 +0200
commit53a76af4e8228222a1e5a932835574fb6f963237 (patch)
treed970f04a579fcc5cd506ed34e4eeb707e90bf411
parentefb3cd412f97293cacc13827848779731c100fa9 (diff)
parent751c61471185a38adabc719c068ed22e64389733 (diff)
downloadrofi-pass-53a76af4e8228222a1e5a932835574fb6f963237.tar.gz
Merge pull request #93 from nilcons-contrib/autotype-first
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 251591c..9b28a1e 100755
--- a/rofi-pass
+++ b/rofi-pass
@@ -402,7 +402,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