mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Fix cli args for led mode
This commit is contained in:
@@ -573,10 +573,11 @@ fn handle_led_mode(
|
|||||||
let modes = aura.first().unwrap().supported_basic_modes()?;
|
let modes = aura.first().unwrap().supported_basic_modes()?;
|
||||||
for command in commands.iter().filter(|command| {
|
for command in commands.iter().filter(|command| {
|
||||||
for mode in &modes {
|
for mode in &modes {
|
||||||
if command
|
let mut mode = <&str>::from(mode).to_string();
|
||||||
.trim()
|
if let Some(pos) = mode.chars().skip(1).position(|c| c.is_uppercase()) {
|
||||||
.starts_with(&<&str>::from(mode).to_lowercase())
|
mode.insert(pos + 1, '-');
|
||||||
{
|
}
|
||||||
|
if command.trim().starts_with(&mode.to_lowercase()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user