From 19c2a7cf7a1b7b457bf1f6f1a7fabfb6f0594d66 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Sat, 7 Apr 2018 17:37:08 +0200 Subject: Added help descripton to patterncfg --- patternutils/commands/patterncfg.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/patternutils/commands/patterncfg.py b/patternutils/commands/patterncfg.py index fe34aff..5d0d72f 100644 --- a/patternutils/commands/patterncfg.py +++ b/patternutils/commands/patterncfg.py @@ -41,7 +41,8 @@ def add( @patterncfg.command(name='remove', help='remove template file') -@click.argument('command', type=click.Choice(['pmatch', 'tmv', 'targs'])) +@click.argument('command', type=click.Choice(['pmatch', 'tmv', 'targs']), + help='select the command from which to remove the file') @click.argument('name') def remove(command: str, name: str) -> None: files = config.find_templates(name, command) @@ -53,11 +54,12 @@ def remove(command: str, name: str) -> None: @patterncfg.command(name='view', help='view template file') -@click.option('-p', '--program', default=None, type=click.Choice(['pmatch', 'tmv', 'targs'])) +@click.option('-c', '--command', default=None, type=click.Choice(['pmatch', 'tmv', 'targs']), + help='select the command from which to view the file') @click.argument('name') -def view(name: str, program: str) -> None: +def view(name: str, command: str) -> None: - files = config.find_templates(name, program) + files = config.find_templates(name, command) if not files: click.secho('No files found!', fg='red', err=True) -- cgit v1.3.1