docs: changes

This commit is contained in:
iff 2025-04-09 17:36:35 +02:00
parent 91cc44cb5f
commit 0fb229b7d8
2 changed files with 17 additions and 4 deletions

View file

@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
### Added
- Regex support for conditions matching
- `,` cannot be used though
### Changed
- Using Damerau variation for string comparison
### Removed
- `exe_contains` rule as it can be done with regex
## [0.7.2] - 2025-04-08 ## [0.7.2] - 2025-04-08
### Added ### Added

View file

@ -25,8 +25,9 @@ command = "helloworld"
# you can add as many `[[match_err]]` section as you want # you can add as many `[[match_err]]` section as you want
[[match_err]] [[match_err]]
# Note: # Note:
# - patterns must be in lowercase # - patterns must be in lowercase without extra space characters
# - patterns should be the output with `LC_ALL=C` environment variable # - patterns should be the output with `LC_ALL=C` environment variable
# - this is a first-pass match. It should be quick so regex is not supported
pattern = [ pattern = [
"pattern 1", "pattern 1",
"pattern 2" "pattern 2"
@ -77,9 +78,8 @@ The placeholder is evaluated as following:
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:
- `executable`: Check if the argument can be found in path - `executable`: Check if the argument can be found in path
- `cmd_contains`: Check if the last user input contains the argument - `cmd_contains`: Check if the last user input contains the argument. Regex supported (you can't use `,` currently because it's used as condition separator)
- `err_contains`: Check if the error of the command contains the argument - `err_contains`: Same as `cmd_contains` but for error message
- `exe_contains`: Check if the command name itself contains the argument
- `length`: Check if the given command has the length of the argument - `length`: Check if the given command has the length of the argument
- `min_length`: Check if the given command has at least the length of the argument - `min_length`: Check if the given command has at least the length of the argument
- `max_length`: Check if the given command has at most the length of the argument - `max_length`: Check if the given command has at most the length of the argument