aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/licenses_command.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/command/licenses_command.rs')
-rw-r--r--crates/shirabe/src/command/licenses_command.rs16
1 files changed, 15 insertions, 1 deletions
diff --git a/crates/shirabe/src/command/licenses_command.rs b/crates/shirabe/src/command/licenses_command.rs
index ba97a055..6dc12559 100644
--- a/crates/shirabe/src/command/licenses_command.rs
+++ b/crates/shirabe/src/command/licenses_command.rs
@@ -3,6 +3,7 @@
use crate::command::base_command::base_command_initialize;
use crate::command::{BaseCommand, BaseCommandData};
use crate::console::input::InputOption;
+use crate::console::input::SuggestedValues;
use crate::io::IOInterfaceImmutable;
use crate::json::JsonFile;
use crate::plugin::CommandEvent;
@@ -49,12 +50,17 @@ impl Command for LicensesCommand {
self.set_name("licenses")?;
self.set_description("Shows information about licenses of dependencies");
self.set_definition(&[
- InputOption::new(
+ InputOption::new6(
"format",
Some(PhpMixed::String("f".to_string())),
Some(InputOption::VALUE_REQUIRED),
"Format of the output: text, json or summary",
Some(PhpMixed::String("text".to_string())),
+ SuggestedValues::List(vec![
+ "text".to_string(),
+ "json".to_string(),
+ "summary".to_string(),
+ ]),
)
.unwrap()
.into(),
@@ -328,6 +334,14 @@ impl Command for LicensesCommand {
base_command_initialize(self, input, output)
}
+ fn complete(
+ &self,
+ input: &shirabe_external_packages::symfony::console::completion::completion_input::CompletionInput,
+ suggestions: &mut shirabe_external_packages::symfony::console::completion::completion_suggestions::CompletionSuggestions,
+ ) -> anyhow::Result<()> {
+ crate::command::base_command::base_command_complete(self, input, suggestions)
+ }
+
shirabe_external_packages::delegate_command_trait_impls_to_inner!(
base_command_data,
"Composer\\Command\\LicensesCommand"