Implement LIST CMD

Fixes #18
This commit is contained in:
Aram 🍐 2021-08-01 00:21:25 -04:00
parent 11f70642dd
commit f3814c831d
3 changed files with 50 additions and 1 deletions

View file

@ -41,6 +41,12 @@ async fn main() -> nut_client::Result<()> {
for var in conn.list_vars(&name).await? {
println!("\t\t- {}", var);
}
// List UPS commands
println!("\t Commands:");
for cmd in conn.list_commands(&name).await? {
println!("\t\t- {}", cmd);
}
}
// Gracefully shut down the connection using the `LOGOUT` command