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" colored = "2.0"
rule_parser = { path = "rule_parser" } rule_parser = { path = "rule_parser" }
regex-lite = "0.1" regex-lite = "0.1"
[profile.release]
strip = true

View file

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