diff options
| -rw-r--r-- | patternutils/commands/patterncfg.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/patternutils/commands/patterncfg.py b/patternutils/commands/patterncfg.py index abc1e09..ea51f5c 100644 --- a/patternutils/commands/patterncfg.py +++ b/patternutils/commands/patterncfg.py @@ -22,7 +22,8 @@ def list() -> None: @patterncfg.command(name='add', help='add new template file') @click.option('-t', '--file-type', default='regex', type=click.Choice(['regex', 'python', 'jinja2']), help='select the file type to use') -@click.argument('command', 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 add( file_type: str, @@ -41,7 +42,8 @@ def add( @patterncfg.command(name='remove', help='remove template file') -@click.argument('command', 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 remove(command: str, name: str) -> None: files = config.find_templates(name, command) |
