mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-13 09:52:00 -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
16
Cargo.lock
generated
16
Cargo.lock
generated
|
@ -338,6 +338,12 @@ dependencies = [
|
|||
"crypto-common",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "either"
|
||||
version = "1.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2"
|
||||
|
||||
[[package]]
|
||||
name = "endi"
|
||||
version = "1.1.0"
|
||||
|
@ -563,6 +569,15 @@ dependencies = [
|
|||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itertools"
|
||||
version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
|
||||
dependencies = [
|
||||
"either",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.4.0"
|
||||
|
@ -921,6 +936,7 @@ dependencies = [
|
|||
"anyhow",
|
||||
"clap",
|
||||
"inotify",
|
||||
"itertools",
|
||||
"libc",
|
||||
"nix",
|
||||
"tempfile",
|
||||
|
|
|
@ -15,6 +15,7 @@ anyhow = "1"
|
|||
clap = { version = "4.5", default-features = false, features = ["derive", "help", "std", "usage"] }
|
||||
inotify = { version = "0.10", default-features = false, features = ["stream"] }
|
||||
libc = "0.2"
|
||||
itertools = "0.12"
|
||||
nix = { version = "0.28", default-features = false, features = ["fs", "signal"] }
|
||||
tokio = { version = "1", default-features = false, features = ["fs", "io-std", "io-util", "macros", "process", "rt-multi-thread", "signal", "sync"] }
|
||||
tokio-stream = { version = "0.1", default-features = false }
|
||||
|
|
|
@ -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