From 13b5d679e60704aa16b6a0abba8e796d5d2def18 Mon Sep 17 00:00:00 2001 From: Thom Dickson Date: Tue, 21 Dec 2021 20:41:39 -0500 Subject: [PATCH] Update README and help message --- README.md | 4 +++- src/lib.rs | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6fc557a..afab17a 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,11 @@ The help message can be displayed by running `shepherd --help`. The default path to the configuration file is `~/config/shepherd/config.toml`; however, a different location can be specified with the `--config` flag. +If a category is specified when adding a repository, it will show up in a folder under your root `source_dir` folder, which can be set in your `config.toml`. + To add a repository to shepherd: ``` -shepherd add +shepherd add [--category | -c ] ``` To list out currently tracked repositories: diff --git a/src/lib.rs b/src/lib.rs index f66ce6d..b5d94c1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -85,7 +85,7 @@ impl State { let name: Option; match next { Some(ref x) => match &x[..] { - "--category" => { + "--category" | "-c" => { state.category = args.next(); name = args.next(); } @@ -93,7 +93,6 @@ impl State { }, None => name = None, } - eprintln!("Category: {:?}", name); match name { Some(x) => { state.name = Some(x); @@ -276,6 +275,7 @@ OPTIONS: -h, --help Print out this help message --config Specify the location of the configuration file --dump-config Dump the current configuration + -c, --category Specify the category when adding a repository COMMANDS: General