wip
This commit is contained in:
34
.config/television/cable/git-diff.toml
Normal file
34
.config/television/cable/git-diff.toml
Normal file
@@ -0,0 +1,34 @@
|
||||
[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"
|
||||
Reference in New Issue
Block a user