diff --git a/crates/radicle-cli/src/commands/id.rs b/crates/radicle-cli/src/commands/id.rs index 0a8e5f682..a0c7c6694 100644 --- a/crates/radicle-cli/src/commands/id.rs +++ b/crates/radicle-cli/src/commands/id.rs @@ -241,26 +241,27 @@ pub fn run(args: Args, ctx: impl term::Context) -> anyhow::Result<()> { identity::State::Redacted(_) => continue, } .into(); - let id = term::format::oid(r.id).into(); + let id = if args.verbose { + term::label(r.id.to_string()) + } else { + term::format::oid(r.id).into() + }; let title = term::label(r.title.to_string()); let (alias, author) = term::format::Author::new(r.author.public_key(), &profile, true).labels(); let timestamp = term::format::timestamp(r.timestamp).into(); let parent = r .parent - .map(term::format::oid) - .unwrap_or_else(|| term::Paint::new("none".to_string())); + .map(|p| { + if args.verbose { + term::label(p.to_string()) + } else { + term::format::oid(p).into() + } + }) + .unwrap_or_else(|| term::Paint::new("none".to_string()).into()); - revisions.push([ - icon, - id, - title, - alias, - author, - state, - timestamp, - parent.into(), - ]); + revisions.push([icon, id, title, alias, author, state, timestamp, parent]); } revisions.print(); diff --git a/crates/radicle-cli/src/commands/id/args.rs b/crates/radicle-cli/src/commands/id/args.rs index 82ff03912..1b5930100 100644 --- a/crates/radicle-cli/src/commands/id/args.rs +++ b/crates/radicle-cli/src/commands/id/args.rs @@ -111,6 +111,11 @@ pub struct Args { #[arg(long, short)] #[arg(global = true)] pub(super) quiet: bool, + + /// Print full OIDs instead of abbreviated ones + #[arg(long, short)] + #[arg(global = true)] + pub(super) verbose: bool, } impl Args {