-
-
Notifications
You must be signed in to change notification settings - Fork 108
Description
Problem
A description of what is the problem that can be fixed with the feature you propose.
When using the text channel I'm looking to find stuff in the contents of files.
But get matches from the file path+name.
I can get the matches if I don't display the filename (or path) however I loose information that i want on screen.
Feature
A description of the feature you propose.
on the channel toml , in the [source] field. Add a new parameter for the text that will be searched.
is this exists then we only get matches on this text , and the display still shows either the entire text from source or whatever the display config suggests.
Examples
One or more code examples that shows the feature in action.
Then the text.toml could be
[metadata]
name = "text"
description = "A channel to find and select text from files"
requirements = ["rg", "batcat"]
[source]
command = "rg . --no-heading --line-number --colors 'match:fg:white' --colors 'path:fg:blue' --color=always"
ansi = false
output = "{strip_ansi|split:\\::..2}"
display = "{strip_ansi|split:\\:..2}"
search = "{strip_ansi|split:\\:2}"
[preview]
command = "batcat -n --color=always '{strip_ansi|split:\\::0}'"
env = { BAT_THEME = "ansi" }
offset = '{strip_ansi|split:\::1}'
[ui]
preview_panel = { header = '{strip_ansi|split:\::..2}' }Additional context
Any other context about the feature request here.
I'm not sure about then name of the config parameter.
Also ideally the search pattern would still be highlighted in the display.