[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"