Possibility to go up to the parent from dir/file channel? #740
-
|
Suppose I opened television within a folder. |
Beta Was this translation helpful? Give feedback.
Answered by
alexpasmantier
Nov 5, 2025
Replies: 2 comments 1 reply
-
|
The following external action for the files channel should do what you're after: [actions.goto_parent]
description = "Open tv in the parent directory"
command = "tv files .."
mode = "execute"You'd then just need to add a keybinding for that action and voila :) Just for reference, here's the complete resulting channel: [metadata]
name = "files"
description = "A channel to select files and directories"
requirements = ["fd", "bat"]
[source]
command = ["fd -t f", "fd -t f -H"]
[preview]
command = "bat -n --color=always '{}'"
env = { BAT_THEME = "Catppuccin Mocha" }
[actions.edit]
description = "Opens the selected entries with Neovim"
command = "vim {}"
mode = "fork"
tty = true
[actions.goto_parent]
description = "Open tv in the parent directory"
command = "tv files .."
mode = "execute"
[keybindings]
shortcut = "f1"
f12 = "actions:edit"
ctrl-up = "actions:goto_parent" |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Great. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For an action that goes to the parent dir for the currently selected entry: