Skip to content

Commit

Permalink
docs: add documentation and completion for --luna
Browse files Browse the repository at this point in the history
  • Loading branch information
Maximilian committed Jul 30, 2018
1 parent 92c327c commit cf226e6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/user-guide/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ You can also use special shortcut options for easier timespan control:
`--day` sets the log timespan to the current day (beginning at 00:00h)
and `--year`, `--month` and `--week` to the current year, month or week
respectively.
The shortcut `--luna` sets the timespan to the current moon cycle with
the last full moon marking the start of the cycle.

If you are outputting to the terminal, you can selectively enable a pager
through the `--pager` option.
Expand Down Expand Up @@ -172,6 +174,7 @@ Flag | Help
`-t, --to DATE` | The date at which the log should stop (inclusive). Defaults to tomorrow.
`-y, --year` | Reports activity for the current year.
`-m, --month` | Reports activity for the current month.
`-l, --luna` | Reports activity for the current moon cycle.
`-w, --week` | Reports activity for the current week.
`-d, --day` | Reports activity for the current day.
`-a, --all` | Reports all activities.
Expand Down Expand Up @@ -329,6 +332,8 @@ You can also use special shortcut options for easier timespan control:
`--day` sets the report timespan to the current day (beginning at 00:00h)
and `--year`, `--month` and `--week` to the current year, month or week
respectively.
The shortcut `--luna` sets the timespan to the current moon cycle with
the last full moon marking the start of the cycle.

You can limit the report to a project or a tag using the `--project` and
`--tag` options. They can be specified several times each to add multiple
Expand Down Expand Up @@ -416,6 +421,7 @@ Flag | Help
`-t, --to DATE` | The date at which the report should stop (inclusive). Defaults to tomorrow.
`-y, --year` | Reports activity for the current year.
`-m, --month` | Reports activity for the current month.
`-l, --luna` | Reports activity for the current moon cycle.
`-w, --week` | Reports activity for the current week.
`-d, --day` | Reports activity for the current day.
`-a, --all` | Reports all activities.
Expand Down
2 changes: 1 addition & 1 deletion watson.completion
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ _watson_complete () {
COMPREPLY=($(compgen -W "$tags" -- ${cur}))
;;
*)
COMPREPLY=($(compgen -W "-a -c -C -d -f -g -G -j -m -p -t -T -w -y --all --current --no-current --pager --no-pager --from --to --project --tag --day --week --month --year --json" -- ${cur})) ;;
COMPREPLY=($(compgen -W "-a -c -C -d -f -g -G -j -m -p -t -T -w -y --all --current --no-current --pager --no-pager --from --to --project --tag --day --week --month --year --luna --json" -- ${cur})) ;;
esac
;;
merge)
Expand Down
4 changes: 4 additions & 0 deletions watson/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,8 @@ def report(watson, current, from_, to, projects, tags, year, month,
`--day` sets the report timespan to the current day (beginning at 00:00h)
and `--year`, `--month` and `--week` to the current year, month or week
respectively.
The shortcut `--luna` sets the timespan to the current moon cycle with
the last full moon marking the start of the cycle.
You can limit the report to a project or a tag using the `--project` and
`--tag` options. They can be specified several times each to add multiple
Expand Down Expand Up @@ -580,6 +582,8 @@ def log(watson, current, from_, to, projects, tags, year, month, week, day,
`--day` sets the log timespan to the current day (beginning at 00:00h)
and `--year`, `--month` and `--week` to the current year, month or week
respectively.
The shortcut `--luna` sets the timespan to the current moon cycle with
the last full moon marking the start of the cycle.
If you are outputting to the terminal, you can selectively enable a pager
through the `--pager` option.
Expand Down

0 comments on commit cf226e6

Please sign in to comment.