Skip to content

Commit af41a63

Browse files
committed
Add heading to phylum extension list output
Closes #497.
1 parent c2810f6 commit af41a63

File tree

1 file changed

+7
-3
lines changed
  • cli/src/commands/extensions

1 file changed

+7
-3
lines changed

cli/src/commands/extensions/mod.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use std::fs;
44
use std::io::ErrorKind;
55
use std::path::PathBuf;
66

7+
use ansi_term::Color;
78
use anyhow::{anyhow, Context, Result};
89
use clap::{arg, ArgMatches, Command, ValueHint};
910
use futures::future::BoxFuture;
@@ -171,9 +172,12 @@ async fn handle_list_extensions() -> CommandResult {
171172
if extensions.is_empty() {
172173
println!("No extensions are currently installed.");
173174
} else {
174-
extensions.into_iter().for_each(|ext| {
175-
println!("{:20} {}", ext.name(), ext.description().unwrap_or(""));
176-
});
175+
let heading = Color::Blue.paint("Extension Name Description");
176+
println!("{heading}");
177+
178+
for extension in extensions {
179+
println!("{:20} {}", extension.name(), extension.description().unwrap_or(""));
180+
}
177181
}
178182

179183
Ok(CommandValue::Code(ExitCode::Ok))

0 commit comments

Comments
 (0)