Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Incorrect JSON escaping of rules regex #2205

Closed
mickaelperrin opened this issue Apr 3, 2024 · 0 comments
Closed

Incorrect JSON escaping of rules regex #2205

mickaelperrin opened this issue Apr 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mickaelperrin
Copy link

I just noticed that rules like:

JB_Apps='^(PyCharm|PhpStorm)$'
yabai -m rule --add app="${JB_Apps}" title=".*\[.*\].*" manage=on display=$CENTRAL_MONITOR # Generic main windows

produces an incorrect JSON and jq fails with:

yabai -m rule --list | jq
jq: parse error: Invalid escape at line 24, column 21
{
	"index":1,
	"label":"",
	"app":"^(PyCharm|PhpStorm)$",
	"title":".*\[.*\].*",
	"role":"",
	"subrole":"",
	"display":1,
	"space":0,
	"follow_space":false,
	"opacity":0.0000,
	"manage":true,
	"sticky":null,
	"mouse_follows_focus":null,
	"sub-layer":"",
	"native-fullscreen":null,
	"grid":"0:0:0:0:0:0",
	"one-shot":false,
	"flags":"0x00000003"
}
@koekeishiya koekeishiya added the bug Something isn't working label Apr 3, 2024
@koekeishiya koekeishiya added the addressed on master; not released Fixed upstream, but not yet released label Apr 3, 2024
@koekeishiya koekeishiya removed the addressed on master; not released Fixed upstream, but not yet released label Apr 4, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants