dkl cg ls: more cols + customizable list
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use clap::{CommandFactory, Parser, Subcommand};
|
||||
use eyre::{Result, format_err};
|
||||
use eyre::{format_err, Result};
|
||||
use human_units::Duration;
|
||||
use log::{debug, error};
|
||||
use std::net::SocketAddr;
|
||||
@@ -99,6 +99,8 @@ enum CgCmd {
|
||||
root: Option<PathBuf>,
|
||||
#[arg(long, short = 'X')]
|
||||
exclude: Vec<String>,
|
||||
#[arg(long, short = 'C')]
|
||||
cols: Option<String>,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -179,7 +181,11 @@ async fn main() -> Result<()> {
|
||||
.map(|_| ())?),
|
||||
|
||||
C::Cg { cmd } => match cmd {
|
||||
CgCmd::Ls { root, exclude } => Ok(dkl::cgroup::ls(root, &exclude).await?),
|
||||
CgCmd::Ls {
|
||||
root,
|
||||
exclude,
|
||||
cols,
|
||||
} => Ok(dkl::cgroup::ls(root, &exclude, cols.as_deref()).await?),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user