diff options
Diffstat (limited to '')
| -rw-r--r-- | patternutils/commands/patterncfg.py | 10 |
1 files 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) |
