-
-
Save thomasba/e91f7aa86e937cef64a6d4601e76bc8e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ bash -x /usr/bin/rofi-pass | |
++ awk '{ print $1 }' | |
++ echo /usr/bin/rofi-pass | |
+ basecommand=/usr/bin/rofi-pass | |
+ main | |
+ shopt -s nullglob globstar | |
+ [[ -f /etc/rofi-pass.conf ]] | |
+ source /etc/rofi-pass.conf | |
++ URL_field=url | |
++ USERNAME_field=user | |
++ AUTOTYPE_field=autotype | |
++ delay=2 | |
++ EDITOR='gvim -f' | |
++ BROWSER=chromium | |
++ default_do=autopass | |
++ auto_enter=false | |
++ notify=false | |
++ passlength=20 | |
++ count=2 | |
++ help_color= | |
++ clip=primary | |
++ autotype=Alt+1 | |
++ type_user=Alt+2 | |
++ type_pass=Alt+3 | |
++ open_url=Alt+4 | |
++ copy_name=Alt+u | |
++ copy_url=Alt+l | |
++ copy_pass=Alt+p | |
++ show=Alt+o | |
++ copy_entry=Alt+2 | |
++ type_entry=Alt+1 | |
++ copy_menu=Alt+c | |
++ action_menu=Alt+a | |
++ type_menu=Alt+t | |
++ help=Alt+h | |
++ switch=Alt+x | |
+ [[ -f /home/thomas/.config/rofi-pass/config ]] | |
+ [[ ! -d /tmp/thomas-rofi-pass ]] | |
+ [[ '' == '' ]] | |
++ rofi -dump-xresources | |
++ awk -F , '/,/{gsub(/ /, "", $2); print $2}' | |
++ grep rofi.color.normal | |
+ help_color='#002b36' | |
+ [[ -z chromium ]] | |
+ [[ -z 2 ]] | |
+ [[ '' == \-\-\l\a\s\t\-\u\s\e\d ]] | |
+ [[ '' == \-\-\s\h\o\w\-\l\a\s\t ]] | |
+ [[ -n '' ]] | |
+ [[ -n '' ]] | |
+ [[ -n '' ]] | |
+ export root=/home/thomas/.password-store | |
+ root=/home/thomas/.password-store | |
+ export PASSWORD_STORE_DIR=/home/thomas/.password-store | |
+ PASSWORD_STORE_DIR=/home/thomas/.password-store | |
+ case $1 in | |
+ mainMenu | |
+ [[ '' == \-\-\b\m\a\r\k\s ]] | |
+ unset selected_password | |
++ echo -e 'Enter: Autotype - Alt+a: Actions - Alt+o: View\nAlt+t: Type Field - Alt+c: Copy Field - Alt+h: Help' | |
++ column -s - -t | |
+ help_text='Enter: Autotype Alt+a: Actions Alt+o: View | |
Alt+t: Type Field Alt+c: Copy Field Alt+h: Help' | |
++ echo 'Enter: Autotype Alt+a: Actions Alt+o: View | |
Alt+t: Type Field Alt+c: Copy Field Alt+h: Help' | |
++ head -1 | |
+ line1='Enter: Autotype Alt+a: Actions Alt+o: View' | |
++ echo 'Enter: Autotype Alt+a: Actions Alt+o: View | |
Alt+t: Type Field Alt+c: Copy Field Alt+h: Help' | |
++ tail -1 | |
+ line3='Alt+t: Type Field Alt+c: Copy Field Alt+h: Help' | |
+ HELP='<span color='\''#002b36'\''>Enter: Autotype Alt+a: Actions Alt+o: View | |
Alt+t: Type Field Alt+c: Copy Field Alt+h: Help</span>' | |
++ _rofi -mesg '<span color='\''#002b36'\''>Enter: Autotype Alt+a: Actions Alt+o: View | |
Alt+t: Type Field Alt+c: Copy Field Alt+h: Help</span>' -dmenu -kb-custom-1 Alt+1 -kb-custom-2 Alt+2 -kb-custom-3 Alt+3 -kb-custom-4 Alt+4 -kb-custom-5 Alt+u -kb-custom-6 Alt+p -kb-custom-7 Alt+o -kb-custom-8 Alt+l -kb-custom-13 Alt+t -kb-custom-14 Alt+a -kb-custom-15 Alt+c -kb-custom-16 Alt+h -kb-custom-17 Alt+x -dmenu -select '' -p 'rofi-pass > ' | |
++ rofi -z -i -width 700 -no-levenshtein-sort -mesg '<span color='\''#002b36'\''>Enter: Autotype Alt+a: Actions Alt+o: View | |
Alt+t: Type Field Alt+c: Copy Field Alt+h: Help</span>' -dmenu -kb-custom-1 Alt+1 -kb-custom-2 Alt+2 -kb-custom-3 Alt+3 -kb-custom-4 Alt+4 -kb-custom-5 Alt+u -kb-custom-6 Alt+p -kb-custom-7 Alt+o -kb-custom-8 Alt+l -kb-custom-13 Alt+t -kb-custom-14 Alt+a -kb-custom-15 Alt+c -kb-custom-16 Alt+h -kb-custom-17 Alt+x -dmenu -select '' -p 'rofi-pass > ' | |
+++ list_passwords | |
++ echo -e '[ Add Entry ]>\n---\n[[truncated]]' | |
+ selected_password=test | |
+ rofi_exit=0 | |
+ [[ test == \[\ \A\d\d\ \E\n\t\r\y\ \]\> ]] | |
++ PASSWORD_STORE_DIR=/home/thomas/.password-store | |
++ pass test | |
+ password_temp=';<>;123@´`!%/ | |
--- | |
user: a | |
autotype: pass :enter | |
custom: 123...' | |
++ head -1 | |
++ echo ';<>;123@´`!%/ | |
--- | |
user: a | |
autotype: pass :enter | |
custom: 123...' | |
+ password=';<>;123@´`!%/' | |
+ declare -A stuff | |
+ read LINE | |
++ PASSWORD_STORE_DIR=/home/thomas/.password-store | |
++ pass test | |
++ tail -n+2 | |
++ grep -P '(: |:\t)' | |
++ awk -F ':[[:space:]]*' '{print $1}' | |
++ echo -e 'user: a' | |
+ _id=user | |
++ echo -e 'user: a' | |
++ awk '{sub(/:/,"")}{for (i=2; i<NF; i++) printf $i " "; print $NF}' | |
+ _val=a | |
+ stuff["${_id}"]=a | |
+ read LINE | |
++ echo -e 'autotype: pass :enter' | |
++ awk -F ':[[:space:]]*' '{print $1}' | |
+ _id=autotype | |
++ echo -e 'autotype: pass :enter' | |
++ awk '{sub(/:/,"")}{for (i=2; i<NF; i++) printf $i " "; print $NF}' | |
+ _val='pass :enter' | |
+ stuff["${_id}"]='pass :enter' | |
+ read LINE | |
++ echo -e 'custom: 123...' | |
++ awk -F ':[[:space:]]*' '{print $1}' | |
+ _id=custom | |
++ echo -e 'custom: 123...' | |
++ awk '{sub(/:/,"")}{for (i=2; i<NF; i++) printf $i " "; print $NF}' | |
+ _val=123... | |
+ stuff["${_id}"]=123... | |
+ read LINE | |
+ stuff["pass"]=';<>;123@´`!%/' | |
+ [[ 0 -eq 0 ]] | |
+ autopass | |
+ [[ test == \[\ \A\d\d\ \E\n\t\r\y\ \]\> ]] | |
+ [[ test == \-\-\- ]] | |
+ rm -f /tmp/thomas-rofi-pass/last_used | |
+ echo '/home/thomas/.password-store: test' | |
+ [[ -z pass :enter ]] | |
+ echo 'pass :enter' | |
pass :enter | |
+ for word in '${stuff["$AUTOTYPE_field"]}' | |
+ [[ pass == \:\t\a\b ]] | |
+ [[ pass == \:\s\p\a\c\e ]] | |
+ [[ pass == \:\d\e\l\a\y ]] | |
+ [[ pass == \:\e\n\t\e\r ]] | |
+ [[ pass == \p\a\s\s ]] | |
+ echo -n ';<>;123@´`!%/' | |
+ xdotool type --clearmodifiers --file - | |
+ for word in '${stuff["$AUTOTYPE_field"]}' | |
+ [[ :enter == \:\t\a\b ]] | |
+ [[ :enter == \:\s\p\a\c\e ]] | |
+ [[ :enter == \:\d\e\l\a\y ]] | |
+ [[ :enter == \:\e\n\t\e\r ]] | |
+ xdotool key Return | |
+ [[ false == \t\r\u\e ]] | |
+ password= | |
+ selected_password= | |
+ unset stuff | |
+ unset password | |
+ unset selected_password | |
+ unset password_temp | |
+ unset stuff |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output:
Should be: