New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of xdotool type
with shell type var breaks in 2.1.1-alpha
#912
Comments
xdotool type
with shell type var in breaks in 2.1.1-alphaxdotool type
with shell type var breaks in 2.1.1-alpha
Hey @jtmackoy, I'm sorry you experienced this problem!
This is interesting, it seems the migration tool produced some invalid YAML... Keep in mind that if the YAML is invalid, none of those matches are loaded, so that would explain why Espanso is not expanding any of your matches. In particular, this line contains a doublequote that has not been escaped:
which should be (notice the
That said, this should not happen. I'll investigate, thank you for the help :) Cheers :) |
@jtmackoy I've investigated a bit, but unfortunately I wasn't able to trigger this bug in the migration process. I understand this is confidential information, but it would be a great help to find a match that causes this migration problem (before the migration, so that we can isolate a specific migration bug, if present) Do you have any idea? |
@federico-terzi - sorry for being a stranger! This issue just cropped up again after I was in a position to reinstall espanso (after an OS upgrade to Pop!-OS 22.04) and found that the current 2.1.5-beta is the recommended version to use. As before, after the upgrade, I ran into issues using a shell type with This problem still seemed to be unique to the use of For context, my rationale for needing to use Ultimately I found a different method to accomplish my goal: this: - trigger: ":my_pw"
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: "xdotool type '$(secret-tool lookup credential password)'"
trim: false (the value of that was replaced with this: - trigger: ":my_pw"
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: secret-tool lookup credential password and I updated {
backend: Clipboard
} So, now, I'm able to execute Not sure if this constitutes a resolution to either this issue or #742, but thought I'd share my shift in approach to this problem. Also - in case no one's told you today: Thanks for the great tool! |
I'll close this as I think it's resolved for now. I don't know if the newly documented |
Describe the bug
Please reference #742 for the workaround implemented there - it elaborates on the workaround where I needed to invoke
xdotool type
to address a character case problem (lack ofSHIFT+<character>
when expanding in certain applications.After upgrading to 2.1.1-alpha, and going through the migration process that moved my %CONFIG%/default.yml to %CONFIG%/match/base.yml, none of my triggers would work.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Step 3 above would result in a successful expansion
Screenshots
None - see command examples referenced throughout.
Logs
Note: I've replaced some paths with %CONFIG% below, others with
~
that reference my home directory.In my %CONFIG%/match/base.yml file, line 55 is as follows:
Setup information
espanso --version
inside a terminal)** Additional info**
I've tried a number of different approaches to solving this problem under v2.1.1-alpha. Ultimately, I suspect that the issue is
xdotool type
inserts some sort of character at the end of its output that the new version of espanso doesn't like:I believe it's a new line or carriage return, but attempting to remove any references to those characters causes odd behavior when executing a trigger - although there are no more
failed to parse YAML match group
errors using the modified cmd.Via shell (zsh) running the following by using
tr -d
to remove those types of characters still appears to show that%
character in the output line, before the text is typed as I would expect:And when I add that line to the
cmd
for my:my_pw
trigger, here is the expansion behavior I see:typing
❯ :my_pw
results in the following expansion
❯ :my_pwThIsIsCoMpLiCaTe
As a result of this break, I've had to downgrade back to espanso 0.7.3. Hopefully the filter that can be produced on #742 will help to sort this out.
The text was updated successfully, but these errors were encountered: