format: uniform rule style

This commit is contained in:
iff 2023-08-04 02:42:16 +02:00
parent 0646317abc
commit 9be1d040c4
5 changed files with 21 additions and 9 deletions

View file

@ -7,5 +7,7 @@ pattern = [
"nu::shell::external_command",
]
suggest = [
'''{{typo[0](path)}} {{command[1:]}}'''
'''
{{typo[0](path)}} {{command[1:]}}
'''
]

View file

@ -95,7 +95,8 @@ suggest = [
'''
#[cmd_contains(pull)]
git pull --set-upstream origin {{shell(git rev-parse --abbrev-ref HEAD)}}
git pull'''
git pull
'''
]
[[match_err]]

View file

@ -30,8 +30,10 @@ pattern = [
suggest = [
'''
#[executable(sudo)]
sudo {{command}}''',
sudo {{command}}
''',
'''
#[executable(doas)]
doas {{command}}''',
doas {{command}}
''',
]

View file

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