From 094f84d2c320bc7320674ba23c715f9fbe634862 Mon Sep 17 00:00:00 2001 From: diogo464 Date: Fri, 9 Jul 2021 05:23:11 -0400 Subject: Changed documentation/help text of subcommands. Change the documentation/help text of subcommmands and added colored output to the help text. --- dotup_cli/src/commands/link.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'dotup_cli/src/commands/link.rs') diff --git a/dotup_cli/src/commands/link.rs b/dotup_cli/src/commands/link.rs index 614c0ca..81c396b 100644 --- a/dotup_cli/src/commands/link.rs +++ b/dotup_cli/src/commands/link.rs @@ -1,4 +1,3 @@ -use clap::Clap; use std::{ fs::{DirEntry, Metadata}, path::{Path, PathBuf}, @@ -6,11 +5,20 @@ use std::{ use super::prelude::*; +/// Creates links +/// +/// If a link is created for a file that already had a link then the old link will be overwritten. +/// By default creating a link to a directory will recursively link all files under that +/// directory, to actually link a directory use the --directory flag. #[derive(Clap)] +#[clap(setting = AppSettings::ColoredHelp)] pub struct Opts { + /// Treats the paths as directories. This will create links to the actual directories instead + /// of recursively linking all files under them. #[clap(long)] directory: bool, + /// The paths to link. The last path is the destination. paths: Vec, } -- cgit