This commit is contained in:
2026-03-25 16:30:17 +01:00
parent f249171d50
commit 5bd960d386
59 changed files with 1354 additions and 10589 deletions

View File

@@ -0,0 +1,28 @@
[metadata]
name = "files"
description = "A channel to select files and directories"
requirements = ["fdfind", "batcat", "cat", "head"]
[source]
command = ["fdfind -t f", "fdfind -t f -H", "fdfind -t f -H -I"]
[preview]
command = ["batcat -n --color=always '{}'", "cat '{}'", "head -50 '{}'"]
env = { BAT_THEME = "ansi" }
[keybindings]
shortcut = "f1"
ctrl-e = "actions:edit"
ctrl-up = "actions:goto_parent_dir"
[actions.edit]
description = "Opens the selected entries with the default editor (falls back to vim)"
command = "${EDITOR:-vim} '{}'"
shell = "bash"
# use `mode = "fork"` if you want to return to tv afterwards
mode = "execute"
[actions.goto_parent_dir]
description = "Re-opens tv in the parent directory"
command = "tv files .."
mode = "execute"