diff options
| author | Dennis Fink | 2018-04-08 01:49:07 +0200 |
|---|---|---|
| committer | Dennis Fink | 2018-04-08 01:49:07 +0200 |
| commit | 104af9d1cd7fc3d8ef41a373e757516d0da88409 (patch) | |
| tree | 2ad234de5f566e0692d53cc6eab28d920f776e8a | |
| parent | 39c8a985a7f8fa7cd93980d243d3527a6a5a7833 (diff) | |
| download | patternutils-104af9d1cd7fc3d8ef41a373e757516d0da88409.tar.gz patternutils-104af9d1cd7fc3d8ef41a373e757516d0da88409.zip | |
Normalize patterncfg subcommands
| -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) |
