mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-16 03:06:47 -04:00
Sort properties when steamosctl -a is used.
To make the output easier to parse as users sort by key.
This commit is contained in:
parent
8788e99245
commit
6e8e36b053
3 changed files with 20 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
use anyhow::Result;
|
||||
use clap::{Parser, Subcommand};
|
||||
use itertools::Itertools;
|
||||
use std::ops::Deref;
|
||||
use std::str::FromStr;
|
||||
use steamos_manager::{ManagerProxy, WifiBackend};
|
||||
|
@ -63,7 +64,8 @@ async fn main() -> Result<()> {
|
|||
let properties = properties_proxy
|
||||
.get_all(zvariant::Optional::from(Some(name)))
|
||||
.await?;
|
||||
for (key, value) in properties.iter() {
|
||||
for key in properties.keys().sorted() {
|
||||
let value = &properties[key];
|
||||
let val = value.deref();
|
||||
println!("{key}: {val}");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue