From 454c872f18bc5b0a157db1aa6b97f83f63b7c098 Mon Sep 17 00:00:00 2001 From: Joel Ostblom Date: Sat, 5 Jun 2021 20:34:35 -0700 Subject: Change parameter name for consistency with other commands `remove` and `edit` uses `id` rather than `frame` --- docs/user-guide/commands.md | 2 +- 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_) -- cgit v1.2.3