diff options
author | Joel Ostblom <joel.ostblom@gmail.com> | 2021-06-05 20:34:35 -0700 |
---|---|---|
committer | Julien Maupetit <jmaupetit@users.noreply.github.com> | 2021-06-09 17:55:32 +0200 |
commit | 454c872f18bc5b0a157db1aa6b97f83f63b7c098 (patch) | |
tree | 1cdb3b971a69ea5ef94e482cf658b9023019d72d | |
parent | 275bd05fddc13b8a69a10ea6f41f2e4ae4e04f47 (diff) |
Change parameter name for consistency with other commands
`remove` and `edit` uses `id` rather than `frame`
-rw-r--r-- | docs/user-guide/commands.md | 2 | ||||
-rw-r--r-- | watson/cli.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/docs/user-guide/commands.md b/docs/user-guide/commands.md index 35d09a9..bf8474d 100644 --- a/docs/user-guide/commands.md +++ b/docs/user-guide/commands.md @@ -579,7 +579,7 @@ Flag | Help ## `restart` ```bash -Usage: watson restart [OPTIONS] [FRAME] +Usage: watson restart [OPTIONS] [ID] ``` Restart monitoring time for a previously stopped project. diff --git a/watson/cli.py b/watson/cli.py index 5e17552..22bd369 100644 --- a/watson/cli.py +++ b/watson/cli.py @@ -321,11 +321,11 @@ def stop(watson, at_): "and start time of the current.")) @click.option('-s/-S', '--stop/--no-stop', 'stop_', default=None, help="(Don't) Stop an already running project.") -@click.argument('frame', default='-1', autocompletion=get_frames) +@click.argument('id', default='-1', autocompletion=get_frames) @click.pass_obj @click.pass_context @catch_watson_error -def restart(ctx, watson, frame, stop_, at_, gap_=True): +def restart(ctx, watson, id, stop_, at_, gap_=True): """ Restart monitoring time for a previously stopped project. @@ -384,7 +384,7 @@ def restart(ctx, watson, frame, stop_, at_, gap_=True): style('project', watson.current['project']), style('tags', watson.current['tags']))) - frame = get_frame_from_argument(watson, frame) + frame = get_frame_from_argument(watson, id) _start(watson, frame.project, frame.tags, restart=True, start_at=at_, gap=gap_) |