feat: add --ids-only flag to --list mode for scripting

Outputs one ID per line with no header. Errors if used with any mode
other than --list. Works with both local and client (remote) list.
This commit is contained in:
2026-03-17 15:04:10 -03:00
parent 2452da52ef
commit cb56a398fa
5 changed files with 37 additions and 2 deletions

View File

@@ -191,6 +191,8 @@ pub struct Settings {
pub table_config: TableConfig,
#[serde(default)]
pub human_readable: bool,
#[serde(default)]
pub ids_only: bool,
pub output_format: Option<String>,
#[serde(default)]
pub quiet: bool,
@@ -277,6 +279,10 @@ impl Settings {
config_builder = config_builder.set_override("human_readable", true)?;
}
if args.options.ids_only {
config_builder = config_builder.set_override("ids_only", true)?;
}
if let Some(output_format) = &args.options.output_format {
config_builder =
config_builder.set_override("output_format", output_format.as_str())?;