Skip to content

Add regexp support for view filters#5430

Open
piyooshm wants to merge 1 commit intojesseduffield:masterfrom
piyooshm:allow-regexp-in-filter
Open

Add regexp support for view filters#5430
piyooshm wants to merge 1 commit intojesseduffield:masterfrom
piyooshm:allow-regexp-in-filter

Conversation

@piyooshm
Copy link
Copy Markdown

PR Description

Allow filtering with a Go regexp when gui.filterMode is regexp, or in substring/fuzzy mode by prefixing the filter with gui.regexpFilterPrefix (default re:). Invalid patterns match nothing; case rules match substring filters ((?i) when the pattern has no uppercase letter).

Add gui.regexpFilterPrefix so the prefix is configurable. Document in Config.md and Searching.md, update the JSON schema, and add unit and integration tests.

Please check if the PR fulfills these requirements

  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

Closes #5429

Allow filtering with a Go regexp when gui.filterMode is regexp, or in
substring/fuzzy mode by prefixing the filter with gui.regexpFilterPrefix
(default re:). Invalid patterns match nothing; case rules match substring
filters ((?i) when the pattern has no uppercase letter).

Add gui.regexpFilterPrefix so the prefix is configurable. Document in
Config.md and Searching.md, update the JSON schema, and add unit and
integration tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filtering expression

1 participant