feat: optional arguments

This commit is contained in:
iff 2023-08-01 17:41:41 +02:00
parent eb59cbde7f
commit 7a05ad56fc
5 changed files with 63 additions and 20 deletions

View file

@ -4,12 +4,12 @@ command = "rm"
pattern = [ "no such file or directory", ]
suggest = [
'''
{{command[:-2]}} {{typo[-1](file)}}'''
{{command[0}} {{opt(-*)}} {{typo[-1](file)}}'''
]
[[match_err]]
pattern = [ "is a directory", ]
suggest = [
'''
{{command[0]}} -r {{command[1:]}}'''
{{command[0]}} {{opt(-*)}} --recursive {{command[1:]}}'''
]