diff options
| author | diogo464 <[email protected]> | 2021-07-09 05:23:11 -0400 |
|---|---|---|
| committer | diogo464 <[email protected]> | 2021-07-09 05:23:11 -0400 |
| commit | 094f84d2c320bc7320674ba23c715f9fbe634862 (patch) | |
| tree | bf33ad3298d38639653267a87f235ee79847ae53 /dotup_cli/src/commands/unlink.rs | |
| parent | 56c87da0183590a39a938a171c5cb80a3e702edd (diff) | |
Changed documentation/help text of subcommands.
Change the documentation/help text of subcommmands and added colored
output to the help text.
Diffstat (limited to 'dotup_cli/src/commands/unlink.rs')
| -rw-r--r-- | dotup_cli/src/commands/unlink.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/dotup_cli/src/commands/unlink.rs b/dotup_cli/src/commands/unlink.rs index 7ebb19c..f33fe60 100644 --- a/dotup_cli/src/commands/unlink.rs +++ b/dotup_cli/src/commands/unlink.rs | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | use clap::Clap; | ||
| 2 | use std::{ | 1 | use std::{ |
| 3 | fs::{DirEntry, Metadata}, | 2 | fs::{DirEntry, Metadata}, |
| 4 | path::{Path, PathBuf}, | 3 | path::{Path, PathBuf}, |
| @@ -6,12 +5,19 @@ use std::{ | |||
| 6 | 5 | ||
| 7 | use super::prelude::*; | 6 | use super::prelude::*; |
| 8 | 7 | ||
| 8 | /// Unlinks files/directories. | ||
| 9 | /// | ||
| 10 | /// This will recursively remove links. If a path is a directory then it will remove all links | ||
| 11 | /// recursively. | ||
| 12 | /// The links are not uninstall by default, see the --uninstall parameter. | ||
| 9 | #[derive(Clap)] | 13 | #[derive(Clap)] |
| 14 | #[clap(setting = AppSettings::ColoredHelp)] | ||
| 10 | pub struct Opts { | 15 | pub struct Opts { |
| 11 | /// Specifies the install base if the links are also to be uninstalled. | 16 | /// Specify the install base if the links are also to be uninstalled. |
| 12 | #[clap(long)] | 17 | #[clap(long)] |
| 13 | uninstall: Option<PathBuf>, | 18 | uninstall: Option<PathBuf>, |
| 14 | 19 | ||
| 20 | /// The paths to unlink. | ||
| 15 | #[clap(required = true, min_values = 1)] | 21 | #[clap(required = true, min_values = 1)] |
| 16 | paths: Vec<PathBuf>, | 22 | paths: Vec<PathBuf>, |
| 17 | } | 23 | } |
