Skip to content
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

Warning: yabai output special characters break jq if not escaped #2517

Open
ahttraga opened this issue Jan 14, 2025 · 0 comments
Open

Warning: yabai output special characters break jq if not escaped #2517

ahttraga opened this issue Jan 14, 2025 · 0 comments

Comments

@ahttraga
Copy link

In my browser I have a focused tab whose title has a special character:

image

All skhd keyboard shortcuts which pipe to jq stop working when I focus this tab. If I change tabs or close it, the shortcuts start working again.

This is because jq fails processing if it encounters some special characters, such as in an application title, which are output in a yabai query:

jq: parse error: Invalid string: control characters from U+0000 through U+001F must be escaped at line 278

So either yabai should sanitize the output, OR we have to pipe the output to a sanitizer before sending it to jq. A nasty edge case. Maybe yabai could have a command line flag to escape control characters? I couldn't find a jq option to escape the input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant