mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2026-02-02 15:45:11 +01:00
docs: update
This commit is contained in:
parent
f0aa620045
commit
b9f7b92af2
2 changed files with 4 additions and 4 deletions
|
|
@ -6,7 +6,7 @@ Typed a wrong command or don't know what to do? Pay Respects will suggest a fix
|
||||||
- ✏️ **Easy to write rules**: You don't need to know Rust. The rules are written in a TOML file!
|
- ✏️ **Easy to write rules**: You don't need to know Rust. The rules are written in a TOML file!
|
||||||
- 🎯 **Accurate results**: Suggestions are verified before being prompted to the user, no `sudo` suggestions when you are using `doas`!
|
- 🎯 **Accurate results**: Suggestions are verified before being prompted to the user, no `sudo` suggestions when you are using `doas`!
|
||||||
- 🤖 **AI Support**: AI comes in aid when there is no rule for your error!
|
- 🤖 **AI Support**: AI comes in aid when there is no rule for your error!
|
||||||
- 🪶 **Tiny binary size**: Not even 1MB! Even with all features, it's less than 3MB!
|
- 🪶 **Tiny binary size**: Not even 1MB! Even with all optional features, it's less than 3MB!
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
|
||||||
6
rules.md
6
rules.md
|
|
@ -54,9 +54,9 @@ The placeholder is evaluated as following:
|
||||||
- `{{command[1]}}`: The first argument of the command (the command itself has index of 0)
|
- `{{command[1]}}`: The first argument of the command (the command itself has index of 0)
|
||||||
- `{{command[2:5]}}`: The second to fifth arguments. If any of the side is not specified, then it defaults to the start (if it is left) or the end (if it is right).
|
- `{{command[2:5]}}`: The second to fifth arguments. If any of the side is not specified, then it defaults to the start (if it is left) or the end (if it is right).
|
||||||
- `{{typo[2](fix1, fix2)}}`: This will try to change the second argument to candidates in the parenthesis. The argument in parentheses must have at least 2 values. Single arguments are reserved for specific matches, for instance, `path` to search all commands found in the `$PATH` environment, or the `{{shell}}` placeholder, among others.
|
- `{{typo[2](fix1, fix2)}}`: This will try to change the second argument to candidates in the parenthesis. The argument in parentheses must have at least 2 values. Single arguments are reserved for specific matches, for instance, `path` to search all commands found in the `$PATH` environment, or the `{{shell}}` placeholder, among others.
|
||||||
- `{{opt::<Regular Expression>}}`: Optional patterns found in the command with RegEx (see RegEx crate for syntax). Note that all patterns matching this placeholder will not take place when indexing.
|
- `{{opt::<Regular Expression>}}`: Optional patterns captured in the command with RegEx ([see regex crate for syntax](https://docs.rs/regex-lite/latest/regex_lite/#syntax)). Note that all patterns matching this placeholder will not take place when indexing.
|
||||||
- `{{cmd::<Regular Expression>}}`: Get the matching pattern from the last command. Unlike `{{opt}}`, this won't remove the string after matching
|
- `{{cmd::<Regular Expression>}}`: Get the matching captures from the last command. Unlike `{{opt}}`, this won't remove the string after matching
|
||||||
- `{{err::<Regular Expression}}`: Get the matching patterns from the error message.
|
- `{{err::<Regular Expression}}`: Get the matching captures from the error message.
|
||||||
- `{{shell(<shell commands>)}}`: Replace with the output of the shell command. This placeholder can be used along `{{typo}}` as its only argument, where each newline will be evaluated to a candidate.
|
- `{{shell(<shell commands>)}}`: Replace with the output of the shell command. This placeholder can be used along `{{typo}}` as its only argument, where each newline will be evaluated to a candidate.
|
||||||
|
|
||||||
Suggestions can have additional conditions to check. To specify conditions, add a `#[...]` at the first line (just like derive macros in Rust). Available conditions:
|
Suggestions can have additional conditions to check. To specify conditions, add a `#[...]` at the first line (just like derive macros in Rust). Available conditions:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue