aboutsummaryrefslogtreecommitdiff
path: root/dotup_cli/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'dotup_cli/src/commands')
-rw-r--r--dotup_cli/src/commands/init.rs3
-rw-r--r--dotup_cli/src/commands/install.rs5
-rw-r--r--dotup_cli/src/commands/link.rs3
-rw-r--r--dotup_cli/src/commands/uninstall.rs5
-rw-r--r--dotup_cli/src/commands/unlink.rs3
5 files changed, 7 insertions, 12 deletions
diff --git a/dotup_cli/src/commands/init.rs b/dotup_cli/src/commands/init.rs
index b894924..45129bf 100644
--- a/dotup_cli/src/commands/init.rs
+++ b/dotup_cli/src/commands/init.rs
@@ -4,8 +4,7 @@ use super::prelude::*;
4/// 4///
5/// By default this will create the file in the current directory 5/// By default this will create the file in the current directory
6/// but the --depot flag can be used to change this path. 6/// but the --depot flag can be used to change this path.
7#[derive(Clap)] 7#[derive(Parser)]
8#[clap(setting = AppSettings::ColoredHelp)]
9pub struct Opts {} 8pub struct Opts {}
10 9
11pub fn main(config: Config, opts: Opts) -> anyhow::Result<()> { 10pub fn main(config: Config, opts: Opts) -> anyhow::Result<()> {
diff --git a/dotup_cli/src/commands/install.rs b/dotup_cli/src/commands/install.rs
index b56c5f7..e166a7b 100644
--- a/dotup_cli/src/commands/install.rs
+++ b/dotup_cli/src/commands/install.rs
@@ -6,8 +6,7 @@ use super::prelude::*;
6/// 6///
7/// Installing a link will create the necessary directories. 7/// Installing a link will create the necessary directories.
8/// If a file or directory already exists at the location a link would be installed this command will fail. 8/// If a file or directory already exists at the location a link would be installed this command will fail.
9#[derive(Clap)] 9#[derive(Parser)]
10#[clap(setting = AppSettings::ColoredHelp)]
11pub struct Opts { 10pub struct Opts {
12 /// The location where links will be installed to. 11 /// The location where links will be installed to.
13 /// Defaults to the home directory. 12 /// Defaults to the home directory.
@@ -15,7 +14,7 @@ pub struct Opts {
15 install_base: Option<PathBuf>, 14 install_base: Option<PathBuf>,
16 15
17 /// The files/directories to install. 16 /// The files/directories to install.
18 #[clap(required = true, min_values = 1, default_value = ".")] 17 #[clap(min_values = 1, default_value = ".")]
19 paths: Vec<PathBuf>, 18 paths: Vec<PathBuf>,
20} 19}
21 20
diff --git a/dotup_cli/src/commands/link.rs b/dotup_cli/src/commands/link.rs
index 66194e1..d1f61ea 100644
--- a/dotup_cli/src/commands/link.rs
+++ b/dotup_cli/src/commands/link.rs
@@ -10,8 +10,7 @@ use super::prelude::*;
10/// If a link is created for a file that already had a link then the old link will be overwritten. 10/// If a link is created for a file that already had a link then the old link will be overwritten.
11/// By default creating a link to a directory will recursively link all files under that 11/// By default creating a link to a directory will recursively link all files under that
12/// directory, to actually link a directory use the --directory flag. 12/// directory, to actually link a directory use the --directory flag.
13#[derive(Clap)] 13#[derive(Parser)]
14#[clap(setting = AppSettings::ColoredHelp)]
15pub struct Opts { 14pub struct Opts {
16 /// Treats the paths as directories. This will create links to the actual directories instead 15 /// Treats the paths as directories. This will create links to the actual directories instead
17 /// of recursively linking all files under them. 16 /// of recursively linking all files under them.
diff --git a/dotup_cli/src/commands/uninstall.rs b/dotup_cli/src/commands/uninstall.rs
index a81d5e4..fdb1a0a 100644
--- a/dotup_cli/src/commands/uninstall.rs
+++ b/dotup_cli/src/commands/uninstall.rs
@@ -7,8 +7,7 @@ use super::prelude::*;
7/// Uninstalling a link for a file that didnt have a link will do nothing. 7/// Uninstalling a link for a file that didnt have a link will do nothing.
8/// Uninstalling a directory will recursively uninstall all files under it. 8/// Uninstalling a directory will recursively uninstall all files under it.
9/// Symlinks are only deleted if they were pointing to the correct file. 9/// Symlinks are only deleted if they were pointing to the correct file.
10#[derive(Clap)] 10#[derive(Parser)]
11#[clap(setting = AppSettings::ColoredHelp)]
12pub struct Opts { 11pub struct Opts {
13 /// The location where links will be uninstalled from. 12 /// The location where links will be uninstalled from.
14 /// Defaults to home directory. 13 /// Defaults to home directory.
@@ -16,7 +15,7 @@ pub struct Opts {
16 install_base: Option<PathBuf>, 15 install_base: Option<PathBuf>,
17 16
18 /// The files/directories to uninstall. 17 /// The files/directories to uninstall.
19 #[clap(required = true, min_values = 1, default_value = ".")] 18 #[clap(min_values = 1, default_value = ".")]
20 paths: Vec<PathBuf>, 19 paths: Vec<PathBuf>,
21} 20}
22 21
diff --git a/dotup_cli/src/commands/unlink.rs b/dotup_cli/src/commands/unlink.rs
index f33fe60..abe23e3 100644
--- a/dotup_cli/src/commands/unlink.rs
+++ b/dotup_cli/src/commands/unlink.rs
@@ -10,8 +10,7 @@ use super::prelude::*;
10/// This will recursively remove links. If a path is a directory then it will remove all links 10/// This will recursively remove links. If a path is a directory then it will remove all links
11/// recursively. 11/// recursively.
12/// The links are not uninstall by default, see the --uninstall parameter. 12/// The links are not uninstall by default, see the --uninstall parameter.
13#[derive(Clap)] 13#[derive(Parser)]
14#[clap(setting = AppSettings::ColoredHelp)]
15pub struct Opts { 14pub struct Opts {
16 /// Specify the install base if the links are also to be uninstalled. 15 /// Specify the install base if the links are also to be uninstalled.
17 #[clap(long)] 16 #[clap(long)]