feat: regex matching

This commit is contained in:
iff 2023-08-01 19:35:22 +02:00
parent a5762bf121
commit 3e367a09dd
8 changed files with 85 additions and 93 deletions

View file

@ -4,13 +4,15 @@ command = "rm"
pattern = [ "is a directory", ]
suggest = [
'''
{{command}} --recursive'''
{{command}} --recursive
'''
]
[[match_err]]
pattern = [ "no such file or directory", ]
suggest = [
'''
{{command[0}} {{opt(-*)}} {{typo[-1](file)}}'''
{{command[0}} {{opt::(?:\s)-[\w]+}} {{typo[-1](file)}}
'''
]