From 76bff30759612094635cd06366b6eaa240867488 Mon Sep 17 00:00:00 2001 From: Alex Pasmantier <47638216+alexpasmantier@users.noreply.github.com> Date: Mon, 6 Jan 2025 14:13:04 +0100 Subject: [PATCH] feat(cable): add default git diff cable channel (#226) --- .config/config.toml | 3 +++ cable/unix-channels.toml | 5 +++++ cable/windows-channels.toml | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/.config/config.toml b/.config/config.toml index 9e4d7c4..74ea754 100644 --- a/.config/config.toml +++ b/.config/config.toml @@ -179,6 +179,9 @@ toggle_preview = "ctrl-o" "vim" = "files" "bat" = "files" +# git-diff channel +"git add" = "git-diff" + # git-branch channel "git checkout" = "git-branch" "git branch -d" = "git-branch" diff --git a/cable/unix-channels.toml b/cable/unix-channels.toml index 10b0bae..b8064ef 100644 --- a/cable/unix-channels.toml +++ b/cable/unix-channels.toml @@ -1,4 +1,9 @@ # GIT +[[cable_channel]] +name = "git-diff" +source_command = "git diff --name-only" +preview_command = "git diff --color=always {0}" + [[cable_channel]] name = "git-reflog" source_command = 'git reflog' diff --git a/cable/windows-channels.toml b/cable/windows-channels.toml index 0c6c870..281df8b 100644 --- a/cable/windows-channels.toml +++ b/cable/windows-channels.toml @@ -1,4 +1,9 @@ # GIT +[[cable_channel]] +name = "git-diff" +source_command = "git diff --name-only" +preview_command = "git diff --color=always {0}" + [[cable_channel]] name = "git-reflog" source_command = 'git reflog'