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
|
# note that the error is formatted to lowercase without extra spaces
|
||||||
pattern = [
|
pattern = [
|
||||||
"pattern 1",
|
"pattern 1",
|
||||||
"pattern 2",
|
"pattern 2"
|
||||||
]
|
]
|
||||||
# this will change the first argument to `fix`, while keeping the rest intact
|
# 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]]
|
[[match_err]]
|
||||||
pattern = [
|
pattern = [
|
||||||
|
|
@ -76,7 +78,8 @@ pattern = [
|
||||||
suggest = [
|
suggest = [
|
||||||
'''
|
'''
|
||||||
#[executable(sudo), !cmd_contains(sudo)]
|
#[executable(sudo), !cmd_contains(sudo)]
|
||||||
sudo {{command}}'''
|
sudo {{command}}
|
||||||
|
'''
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,7 @@ pattern = [
|
||||||
"nu::shell::external_command",
|
"nu::shell::external_command",
|
||||||
]
|
]
|
||||||
suggest = [
|
suggest = [
|
||||||
'''{{typo[0](path)}} {{command[1:]}}'''
|
'''
|
||||||
|
{{typo[0](path)}} {{command[1:]}}
|
||||||
|
'''
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,8 @@ suggest = [
|
||||||
'''
|
'''
|
||||||
#[cmd_contains(pull)]
|
#[cmd_contains(pull)]
|
||||||
git pull --set-upstream origin {{shell(git rev-parse --abbrev-ref HEAD)}}
|
git pull --set-upstream origin {{shell(git rev-parse --abbrev-ref HEAD)}}
|
||||||
git pull'''
|
git pull
|
||||||
|
'''
|
||||||
]
|
]
|
||||||
|
|
||||||
[[match_err]]
|
[[match_err]]
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,10 @@ pattern = [
|
||||||
suggest = [
|
suggest = [
|
||||||
'''
|
'''
|
||||||
#[executable(sudo)]
|
#[executable(sudo)]
|
||||||
sudo {{command}}''',
|
sudo {{command}}
|
||||||
|
''',
|
||||||
'''
|
'''
|
||||||
#[executable(doas)]
|
#[executable(doas)]
|
||||||
doas {{command}}''',
|
doas {{command}}
|
||||||
|
''',
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,16 @@ command = "rm"
|
||||||
[[match_err]]
|
[[match_err]]
|
||||||
pattern = [ "is a directory", ]
|
pattern = [ "is a directory", ]
|
||||||
suggest = [
|
suggest = [
|
||||||
'''{{command}} --recursive'''
|
'''
|
||||||
|
{{command}} --recursive
|
||||||
|
'''
|
||||||
]
|
]
|
||||||
|
|
||||||
[[match_err]]
|
[[match_err]]
|
||||||
pattern = [ "no such file or directory", ]
|
pattern = [ "no such file or directory", ]
|
||||||
suggest = [
|
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