diff options
Diffstat (limited to 'dotup_cli/src/commands/install.rs')
| -rw-r--r-- | dotup_cli/src/commands/install.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/dotup_cli/src/commands/install.rs b/dotup_cli/src/commands/install.rs index 72cabf3..16343c5 100644 --- a/dotup_cli/src/commands/install.rs +++ b/dotup_cli/src/commands/install.rs | |||
| @@ -1,16 +1,20 @@ | |||
| 1 | use clap::Clap; | ||
| 2 | use std::path::PathBuf; | 1 | use std::path::PathBuf; |
| 3 | 2 | ||
| 4 | use super::prelude::*; | 3 | use super::prelude::*; |
| 5 | 4 | ||
| 5 | /// Install links. (Creates symlinks). | ||
| 6 | /// | ||
| 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. | ||
| 6 | #[derive(Clap)] | 9 | #[derive(Clap)] |
| 10 | #[clap(setting = AppSettings::ColoredHelp)] | ||
| 7 | pub struct Opts { | 11 | pub struct Opts { |
| 8 | /// The location where links will be installed to. | 12 | /// The location where links will be installed to. |
| 9 | /// Defaults to home directory. | 13 | /// Defaults to the home directory. |
| 10 | #[clap(long)] | 14 | #[clap(long)] |
| 11 | install_base: Option<PathBuf>, | 15 | install_base: Option<PathBuf>, |
| 12 | 16 | ||
| 13 | /// The files/directories to install | 17 | /// The files/directories to install. |
| 14 | #[clap(required = true, min_values = 1)] | 18 | #[clap(required = true, min_values = 1)] |
| 15 | paths: Vec<PathBuf>, | 19 | paths: Vec<PathBuf>, |
| 16 | } | 20 | } |
