From 8ce32074bee601ebdd266b8f9c8f1eaa9a834222 Mon Sep 17 00:00:00 2001 From: bigfoot547 Date: Tue, 11 Feb 2025 15:49:51 -0600 Subject: add some documentation --- ozone-cli/src/cli.rs | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'ozone-cli/src/cli.rs') diff --git a/ozone-cli/src/cli.rs b/ozone-cli/src/cli.rs index ad5769b..d145e89 100644 --- a/ozone-cli/src/cli.rs +++ b/ozone-cli/src/cli.rs @@ -71,9 +71,9 @@ pub struct InstanceSettingsArgs { /// Specify the resolution of the Minecraft game window. Note that this argument is a suggestion /// to the game process, and could be ignored or unsupported on some versions. /// - /// Pass the resolution as _width_x_height_ (like `800x600'). + /// Pass the resolution as WIDTHxHEIGHT (like `800x600'). /// - /// Use the special value _default_ to reset to the default value. + /// Use the special value `default' to reset to the default value. #[arg(long, short = 'r', value_parser = parse_resolution_argument)] pub resolution: Option>, } @@ -122,11 +122,29 @@ pub struct InstanceCreateArgs { #[derive(Subcommand, Debug)] pub enum InstanceCommand { + /// Selects an instance. Select(InstanceSelectArgs), + + /// Creates an instance, optionally cloning the selected instance. Create(InstanceCreateArgs), + + /// Change the configuration of an instance. Set(InstanceSettingsArgs), + + /// Rename an instance. + Rename { + /// The new name for the instance + #[arg(index = 1)] + name: String + }, + + /// Deletes the selected instance. Delete, + + /// Lists known instances. List, + + /// Shows complete information about the selected instance. Info } @@ -144,7 +162,14 @@ impl InstanceArgs { #[derive(Subcommand, Debug)] pub enum RootCommand { + /// Manages instances. + /// + /// An instance in terms of this launcher is a set of settings which decides how to launch the + /// game. This includes a version of the game, a set of JVM arguments, and other miscellaneous + /// settings. Each instance runs the game in a separate directory. Instance(InstanceArgs), + + /// Launches the selected instance with the selected account. Launch } @@ -152,7 +177,7 @@ pub enum RootCommand { #[clap(version)] pub struct Cli { /// Run the launcher in offline mode. The launcher will not attempt to make any requests using - /// the network. The launcher _will_ verify the integrity of files required to launch the game, + /// the network. The launcher WILL verify the integrity of files required to launch the game, /// and refuse to launch the game with an error if it must download a file. #[arg(long, global = true)] pub offline: bool, -- cgit v1.2.3-70-g09d2