35 lines
704 B
TOML
35 lines
704 B
TOML
[metadata]
|
|
name = "git-diff"
|
|
description = "A channel to select files from git diff commands"
|
|
requirements = ["git"]
|
|
|
|
[source]
|
|
command = "GIT_PAGER= git diff --name-only HEAD"
|
|
|
|
[preview]
|
|
command = "GIT_PAGER= git diff HEAD --color=always -- '{}'"
|
|
|
|
[ui]
|
|
layout = "portrait"
|
|
|
|
[keybindings]
|
|
ctrl-s = "actions:stage"
|
|
ctrl-r = "actions:restore"
|
|
ctrl-e = "actions:edit"
|
|
|
|
[actions.stage]
|
|
description = "Stage the selected file"
|
|
command = "git add '{}'"
|
|
mode = "fork"
|
|
|
|
[actions.restore]
|
|
description = "Discard changes in the selected file"
|
|
command = "git restore '{}'"
|
|
mode = "fork"
|
|
|
|
[actions.edit]
|
|
description = "Open the selected file in editor"
|
|
command = "${EDITOR:-vim} '{}'"
|
|
shell = "bash"
|
|
mode = "execute"
|