Skip to content

Commit 55793c9

Browse files
committed
Bump version and add short commands for start and restart
1 parent 35456c2 commit 55793c9

File tree

4 files changed

+43
-18
lines changed

4 files changed

+43
-18
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ repository = "https://github.com/chdsbd/doug"
55
documentation = "https://github.com/chdsbd/doug/blob/master/README.md"
66
readme="README.md"
77
license = "MIT"
8-
version = "1.8.0"
8+
version = "1.9.0"
99
authors = ["Christopher Dignam <chris@dignam.xyz>"]
1010

1111
[dependencies]

README.md

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,26 @@ doug generate-completions --shell bash > $(brew --prefix)/etc/bash_completion.d/
2727
## Usage
2828
```
2929
USAGE:
30-
doug <SUBCOMMAND>
30+
doug [FLAGS] <SUBCOMMAND>
3131
3232
FLAGS:
33+
-p, --path Path to load settings file from. (default: ~/.doug/settings.json)
3334
-h, --help Prints help information
3435
-V, --version Prints version information
3536
3637
SUBCOMMANDS:
37-
start Track new or existing project
38-
status Display elapsed time, start time, and running project name
39-
stop Stop any running projects
40-
cancel Stop running project and remove most recent time interval
41-
restart Track last running project
42-
log Display time intervals across all projects
43-
report Display aggregate time from projects
44-
amend Change name of currently running project
45-
edit Edit last frame or currently running frame
46-
delete Delete all intervals for project
38+
start Track new or existing project
39+
status Display elapsed time, start time, and running project name
40+
stop Stop any running projects
41+
cancel Stop running project and remove most recent time interval
42+
restart Track last running project
43+
log Display time intervals across all projects
44+
report Display aggregate time from projects
45+
amend Change name of currently running project
46+
edit Edit last frame or currently running frame
47+
settings configure doug settings
48+
generate-completions Generate completions
49+
delete Delete all intervals for project
4750
```
4851

4952
### start
@@ -146,13 +149,33 @@ ARGS:
146149
Edit last frame or currently running frame
147150
148151
USAGE:
149-
doug edit [repo]
152+
doug edit [OPTIONS]
150153
151154
FLAGS:
152155
-h, --help Prints help information
153156
154-
ARGS:
155-
<repo> project to track
157+
OPTIONS:
158+
-e, --end <end> ending date
159+
-s, --start <start> starting date
160+
```
161+
### settings
162+
```
163+
configure doug settings
164+
165+
USAGE:
166+
doug settings [FLAGS] [OPTIONS]
167+
168+
FLAGS:
169+
-c, --clear
170+
clear settings file
171+
172+
-h, --help
173+
Prints help information
174+
175+
176+
OPTIONS:
177+
-p, --path <path>
178+
path to store data file. this only affects the data file location. settings are stored in $HOME.
156179
```
157180
### delete
158181
```

src/main.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@ fn main() {
5858
"Print running project name or nothing if there isn't a running project.",
5959
)),
6060
).subcommand(SubCommand::with_name("stop").about("Stop any running projects"))
61+
.subcommand(SubCommand::with_name("s").about("Stop any running projects").settings(&[AppSettings::Hidden, AppSettings::HidePossibleValuesInHelp]))
6162
.subcommand(
6263
SubCommand::with_name("cancel")
6364
.about("Stop running project and remove most recent time interval"),
6465
).subcommand(SubCommand::with_name("restart").about("Track last running project"))
66+
.subcommand(SubCommand::with_name("r").about("Track last running project").settings(&[AppSettings::Hidden, AppSettings::HidePossibleValuesInHelp]))
6567
.subcommand(
6668
SubCommand::with_name("log").about("Display time intervals across all projects"),
6769
).subcommand(
@@ -185,7 +187,7 @@ fn main() {
185187
};
186188

187189
let results = match matches.subcommand() {
188-
("start", Some(matches)) => match matches.value_of("project") {
190+
("start", Some(matches)) | ("s", Some(matches)) => match matches.value_of("project") {
189191
Some(project) => doug.start(project),
190192
// Restart last project if not argument is provided
191193
None => doug.restart(),
@@ -229,7 +231,7 @@ fn main() {
229231
("edit", Some(matches)) => doug.edit(matches.value_of("start"), matches.value_of("end")),
230232
("stop", Some(_)) => doug.stop(),
231233
("cancel", Some(_)) => doug.cancel(),
232-
("restart", Some(_)) => doug.restart(),
234+
("restart", Some(_)) | ("r", Some(_)) => doug.restart(),
233235
("log", Some(_)) => doug.log(),
234236
("settings", Some(matches)) => {
235237
doug.settings(matches.value_of("path"), matches.is_present("clear"))

0 commit comments

Comments
 (0)