diff options
| author | Dennis Fink | 2019-08-29 02:47:59 +0200 |
|---|---|---|
| committer | Dennis Fink | 2019-08-29 02:47:59 +0200 |
| commit | 93892a4b1a4f4b00d58212585957d260f195a1a9 (patch) | |
| tree | af3138ee31e86eb3b639317e0069f34485fc6c79 | |
| parent | ff0a9ca4efefc2593345427f959b6d3df70882f6 (diff) | |
| download | patternutils-93892a4b1a4f4b00d58212585957d260f195a1a9.tar.gz patternutils-93892a4b1a4f4b00d58212585957d260f195a1a9.zip | |
Fix patterncfg add
| -rw-r--r-- | patternutils/commands/patterncfg.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/patternutils/commands/patterncfg.py b/patternutils/commands/patterncfg.py index 4b29dfd..3cb7067 100644 --- a/patternutils/commands/patterncfg.py +++ b/patternutils/commands/patterncfg.py @@ -35,19 +35,19 @@ def list() -> None: @patterncfg.command(name='add', help='add new template file') -@click.option('-t', '--template-eninge', default=None, type=click.Choice(('python', 'jinja2')), +@click.option('-t', '--template-engine', 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: str, name: str) -> None: +def add(template_engine: Optional[str], command: str, name: str) -> None: if command == 'pmatch': fileext = 'regex' else: - if file_type not in ('python', 'jinja2'): + if template_engine not in ('python', 'jinja2'): fileext = 'python' else: - fileext = file_type + fileext = template_engine filename = os.path.join(config.CONFIG_PATH, command, '{}.{}'.format(name, fileext)) click.edit(filename=filename) |
