You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When querying with an invalid, named selector, yabai acts as if no selector was given at all and returns the focused window/space/display. When given a number instead of a string, yabai returns an error instead.
# returns an error
❯ yabai -m query --windows --window 0
could not locate the selected window.
❯ echo$?
1
# returns the focused window
❯ yabai -m query --window --window asdf
{ ... }
❯ echo$?
0
The behaviour should be consistent so that scripts can test whether a valid selector was provided.
# check if a valid display selector was provided by the userif! yabai -m query --displays --display "${1}"> /dev/null 2>&1;then>&2echo"could not locate the selected display."exit 1
fi
The text was updated successfully, but these errors were encountered:
Bug report
When querying with an invalid, named selector, yabai acts as if no selector was given at all and returns the focused window/space/display. When given a number instead of a string, yabai returns an error instead.
The behaviour should be consistent so that scripts can test whether a valid selector was provided.
The text was updated successfully, but these errors were encountered: