-
Notifications
You must be signed in to change notification settings - Fork 134
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
feat: allow using a list as linux dev value #647
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall seems like a good solution
Co-authored-by: jtroo <j.andreitabs@gmail.com>
By the ocassion that we're changing linux device stuff, maybe it should be changed to not allow and error when more than one of I don't see any benefits of them being allowed to co-exist. Both |
This change doesn't seem worth potentially breaking some users' configs. Some users may have left 2 or 3 of the variants in as part of testing or some other reason and never bothered to remove it. |
True. I guess this could potentially go into v2.0 backlog, if we have one already. |
Made a change to the error condition of empty devices - technically the only guaranteed error is if |
} | ||
} | ||
"linux-dev-names-include" => { | ||
#[cfg(any(target_os = "linux", target_os = "unknown"))] | ||
{ | ||
cfg.linux_dev_names_include = Some(parse_linux_dev(val)?); | ||
if cfg.linux_dev.is_empty() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be if cfg.linux_dev_names_include
... ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching that, I'll fix it in main directly
This allows a user to define devices using a sexpr list. The old way (colon separated string) is not removed for compatibility.
This is better because it allows some special characters in the device path. See [1] for more information. [1]: jtroo/kanata#647
This is better because it allows some special characters in the device path. See [1] for more information. [1]: jtroo/kanata#647
Describe your changes. Use imperative present tense.
Closes #121
Allows to define device list as an actual list of strings.
Old way (colon separated string) is not removed for compatibility.
Checklist