mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 06:20:09 +01:00
format: uniform rule style
This commit is contained in:
parent
0646317abc
commit
9be1d040c4
5 changed files with 21 additions and 9 deletions
|
|
@ -61,10 +61,12 @@ command = "world"
|
|||
# note that the error is formatted to lowercase without extra spaces
|
||||
pattern = [
|
||||
"pattern 1",
|
||||
"pattern 2",
|
||||
"pattern 2"
|
||||
]
|
||||
# this will change the first argument to `fix`, while keeping the rest intact
|
||||
suggest = [ "{{command[0]}} fix {{command[2:]}}" ]
|
||||
suggest = [
|
||||
"{{command[0]}} fix {{command[2:]}}",
|
||||
]
|
||||
|
||||
[[match_err]]
|
||||
pattern = [
|
||||
|
|
@ -76,7 +78,8 @@ pattern = [
|
|||
suggest = [
|
||||
'''
|
||||
#[executable(sudo), !cmd_contains(sudo)]
|
||||
sudo {{command}}'''
|
||||
sudo {{command}}
|
||||
'''
|
||||
]
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -7,5 +7,7 @@ pattern = [
|
|||
"nu::shell::external_command",
|
||||
]
|
||||
suggest = [
|
||||
'''{{typo[0](path)}} {{command[1:]}}'''
|
||||
'''
|
||||
{{typo[0](path)}} {{command[1:]}}
|
||||
'''
|
||||
]
|
||||
|
|
|
|||
|
|
@ -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]]
|
||||
|
|
|
|||
|
|
@ -30,8 +30,10 @@ pattern = [
|
|||
suggest = [
|
||||
'''
|
||||
#[executable(sudo)]
|
||||
sudo {{command}}''',
|
||||
sudo {{command}}
|
||||
''',
|
||||
'''
|
||||
#[executable(doas)]
|
||||
doas {{command}}''',
|
||||
doas {{command}}
|
||||
''',
|
||||
]
|
||||
|
|
|
|||
|
|
@ -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)}}
|
||||
'''
|
||||
]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue