summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--patternutils/commands/patterncfg.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/patternutils/commands/patterncfg.py b/patternutils/commands/patterncfg.py
index e2432d6..75272ac 100644
--- a/patternutils/commands/patterncfg.py
+++ b/patternutils/commands/patterncfg.py
@@ -35,12 +35,11 @@ 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.option('-c', '--command', default=None, type=click.Choice(['pmatch', 'tmv', 'targs']),
- help='select the command from which to view the file')
+@click.option('-t', '--template-eninge', default=None, type=click.Choice(('python', 'jinja2')),
+ help='select the template engine to use. Only applicable for tmv and targs')
+@click.argument('command', required=True, type=click.Choice(CURRENT_SUPPORTED_PROGRAMS))
@click.argument('name')
-def add(file_type: str, command: Optional[str], name: str) -> None:
+def add(file_type: str, command: str, name: str) -> None:
if command == 'pmatch':
fileext = 'regex'