diff options
| author | diogo464 <[email protected]> | 2021-07-14 15:04:08 +0100 |
|---|---|---|
| committer | diogo464 <[email protected]> | 2021-07-14 15:04:08 +0100 |
| commit | 4adc2435da7d58cd34b9f1706b3cea9fb524b946 (patch) | |
| tree | 54c2c2d44c78c80cfeb6e3b316567402c3302785 | |
| parent | 74a90b975d7a448950625bc767b8052fe8bef0d4 (diff) | |
install and uninstall can be called without args.
Allow calling install and uninstall without any specified path.
If no path is specified then every file/directory will be
installed/uninstalled.
| -rw-r--r-- | dotup_cli/src/commands/install.rs | 2 | ||||
| -rw-r--r-- | dotup_cli/src/commands/uninstall.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/dotup_cli/src/commands/install.rs b/dotup_cli/src/commands/install.rs index 16343c5..b56c5f7 100644 --- a/dotup_cli/src/commands/install.rs +++ b/dotup_cli/src/commands/install.rs | |||
| @@ -15,7 +15,7 @@ pub struct Opts { | |||
| 15 | install_base: Option<PathBuf>, | 15 | install_base: Option<PathBuf>, |
| 16 | 16 | ||
| 17 | /// The files/directories to install. | 17 | /// The files/directories to install. |
| 18 | #[clap(required = true, min_values = 1)] | 18 | #[clap(required = true, min_values = 1, default_value = ".")] |
| 19 | paths: Vec<PathBuf>, | 19 | paths: Vec<PathBuf>, |
| 20 | } | 20 | } |
| 21 | 21 | ||
diff --git a/dotup_cli/src/commands/uninstall.rs b/dotup_cli/src/commands/uninstall.rs index 44c33b2..a81d5e4 100644 --- a/dotup_cli/src/commands/uninstall.rs +++ b/dotup_cli/src/commands/uninstall.rs | |||
| @@ -16,7 +16,7 @@ pub struct Opts { | |||
| 16 | install_base: Option<PathBuf>, | 16 | install_base: Option<PathBuf>, |
| 17 | 17 | ||
| 18 | /// The files/directories to uninstall. | 18 | /// The files/directories to uninstall. |
| 19 | #[clap(required = true, min_values = 1)] | 19 | #[clap(required = true, min_values = 1, default_value = ".")] |
| 20 | paths: Vec<PathBuf>, | 20 | paths: Vec<PathBuf>, |
| 21 | } | 21 | } |
| 22 | 22 | ||
