wip
This commit is contained in:
29
.config/television/cable/text.toml
Normal file
29
.config/television/cable/text.toml
Normal file
@@ -0,0 +1,29 @@
|
||||
[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",
|
||||
"rg . --no-heading --line-number --hidden --colors 'match:fg:white' --colors 'path:fg:blue' --color=always",
|
||||
]
|
||||
ansi = true
|
||||
output = "'+{strip_ansi|split:\\::1}' '{strip_ansi|split:\\::0}'"
|
||||
|
||||
[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}' }
|
||||
|
||||
[keybindings]
|
||||
ctrl-e = "actions:edit"
|
||||
|
||||
[actions.edit]
|
||||
description = "Open file in editor at line"
|
||||
command = "${EDITOR:-vim} '+{strip_ansi|split:\\::1}' '{strip_ansi|split:\\::0}'"
|
||||
shell = "bash"
|
||||
mode = "execute"
|
||||
Reference in New Issue
Block a user