diff --git a/rust/Cargo.lock b/rust/Cargo.lock index e9d73fbda1..f939274673 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -493,6 +493,7 @@ dependencies = [ "bitflags", "clap_lex", "strsim", + "terminal_size", ] [[package]] @@ -1804,6 +1805,16 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "terminal_size" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e6bf6f19e9f8ed8d4048dc22981458ebcf406d67e94cd422e5ecd73d63b3237" +dependencies = [ + "rustix", + "windows-sys 0.48.0", +] + [[package]] name = "thiserror" version = "1.0.43" diff --git a/rust/agama-cli/Cargo.toml b/rust/agama-cli/Cargo.toml index fcf9039578..d66c105d21 100644 --- a/rust/agama-cli/Cargo.toml +++ b/rust/agama-cli/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -clap = { version = "4.1.4", features = ["derive"] } +clap = { version = "4.1.4", features = ["derive", "wrap_help"] } agama-lib = { path="../agama-lib" } agama-settings = { path="../agama-settings" } serde = { version = "1.0.152" } diff --git a/rust/agama-cli/src/commands.rs b/rust/agama-cli/src/commands.rs index 9c07516988..45d83b78da 100644 --- a/rust/agama-cli/src/commands.rs +++ b/rust/agama-cli/src/commands.rs @@ -21,7 +21,14 @@ pub enum Commands { /// Autoinstallation profile handling #[command(subcommand)] Profile(ProfileCommands), - /// Questions handling + /// Configuration for questions that come from installer + /// + /// Questions are raised when an unexpected (by the user) situation happens in the installer: + /// like if an encrypted partition is detected and cannot be inspected, + /// if a repository is signed by an unknown GPG key, or if the installer is not sure + /// if multipath should be activated. + /// + /// For more details see official agama documentation for Questions. #[command(subcommand)] Questions(QuestionsCommands), } diff --git a/rust/agama-cli/src/questions.rs b/rust/agama-cli/src/questions.rs index 8bce0cb928..c73dc9d055 100644 --- a/rust/agama-cli/src/questions.rs +++ b/rust/agama-cli/src/questions.rs @@ -5,9 +5,20 @@ use clap::{Args, Subcommand, ValueEnum}; #[derive(Subcommand, Debug)] pub enum QuestionsCommands { - /// Set mode for answering questions. + /// Sets the mode for answering questions. + /// + /// It allows to decide if questions will be interactive or + /// if they should not block installation. Mode(ModesArgs), + /// Loads predefined answers to questions. + /// + /// It allows to predefine answers for certain questions to skip + /// them in interactive mode or change answer in automatic mode. + /// + /// For more details and examples see official Agama documentation. + /// https://github.com/openSUSE/agama/blob/master/doc/questions.md Answers { + /// Local path to file with answers in YAML format path: String, }, } diff --git a/rust/package/agama-cli.changes b/rust/package/agama-cli.changes index bb5e037ee4..5b423fe9de 100644 --- a/rust/package/agama-cli.changes +++ b/rust/package/agama-cli.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Sep 14 19:44:57 UTC 2023 - Josef Reidinger + +- Improve questions CLI help text (gh#openSUSE/agama#754) + ------------------------------------------------------------------- Thu Sep 14 10:10:37 UTC 2023 - Imobach Gonzalez Sosa