aboutsummaryrefslogtreecommitdiff
path: root/dotup_cli/src/commands/unlink.rs
diff options
context:
space:
mode:
Diffstat (limited to 'dotup_cli/src/commands/unlink.rs')
-rw-r--r--dotup_cli/src/commands/unlink.rs10
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 @@
1use clap::Clap;
2use std::{ 1use 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
7use super::prelude::*; 6use 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)]
10pub struct Opts { 15pub 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}