fix: outdated syntax in README

This commit is contained in:
iff 2023-08-02 03:05:25 +02:00
parent 26384f4ffe
commit a9cea6edf1
2 changed files with 7 additions and 2 deletions

View file

@ -7,3 +7,6 @@ edition = "2021"
colored = "2.0"
rule_parser = { path = "rule_parser" }
regex-lite = "0.1"
[profile.release]
strip = true

View file

@ -64,7 +64,7 @@ pattern = [
"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 = [
@ -73,9 +73,11 @@ pattern = [
# this will add a `sudo` before the command if:
# - the `sudo` is found by `which`
# - the last command does not contain `sudo`
suggest = '''
suggest = [
'''
#[executable(sudo), !cmd_contains(sudo)]
sudo {{command}}'''
]
```
The placeholder is evaluated as following: