diff options
Diffstat (limited to 'dotup_cli/src/commands/uninstall.rs')
| -rw-r--r-- | dotup_cli/src/commands/uninstall.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/dotup_cli/src/commands/uninstall.rs b/dotup_cli/src/commands/uninstall.rs index dad55a5..44c33b2 100644 --- a/dotup_cli/src/commands/uninstall.rs +++ b/dotup_cli/src/commands/uninstall.rs | |||
| @@ -1,16 +1,21 @@ | |||
| 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 | /// Uninstalls links. (Removes symlinks). | ||
| 6 | /// | ||
| 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. | ||
| 9 | /// Symlinks are only deleted if they were pointing to the correct file. | ||
| 6 | #[derive(Clap)] | 10 | #[derive(Clap)] |
| 11 | #[clap(setting = AppSettings::ColoredHelp)] | ||
| 7 | pub struct Opts { | 12 | pub struct Opts { |
| 8 | /// The location where links will be uninstalled from. | 13 | /// The location where links will be uninstalled from. |
| 9 | /// Defaults to home directory. | 14 | /// Defaults to home directory. |
| 10 | #[clap(long)] | 15 | #[clap(long)] |
| 11 | install_base: Option<PathBuf>, | 16 | install_base: Option<PathBuf>, |
| 12 | 17 | ||
| 13 | /// The files/directories to uninstall | 18 | /// The files/directories to uninstall. |
| 14 | #[clap(required = true, min_values = 1)] | 19 | #[clap(required = true, min_values = 1)] |
| 15 | paths: Vec<PathBuf>, | 20 | paths: Vec<PathBuf>, |
| 16 | } | 21 | } |
