From ad2479bd67113b326adad803c00b7a83c9a809cf Mon Sep 17 00:00:00 2001 From: NikolayHD Date: Sun, 20 Mar 2022 20:48:17 +0300 Subject: [PATCH] Updated Custom Commands Compendium (markdown) --- Custom-Commands-Compendium.md | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/Custom-Commands-Compendium.md b/Custom-Commands-Compendium.md index e56e99f..85c6309 100644 --- a/Custom-Commands-Compendium.md +++ b/Custom-Commands-Compendium.md @@ -179,6 +179,42 @@ customCommands: subprocess: true ``` +## Commands to integrate [tig](https://jonas.github.io/tig/) +to enable fast access to "blame" and "browse files at revision" features from within lazygit +```yml +customCommands: + - key: b + command: tig blame -- {{.SelectedFile.Name}} + context: files + description: blame file at tree + subprocess: yes + - key: b + command: tig blame {{.SelectedSubCommit.Sha}} -- {{.SelectedCommitFile.Name}} + context: commitFiles + description: blame file at revision + subprocess: yes + - key: B + command: tig blame -- {{.SelectedCommitFile.Name}} + context: commitFiles + description: blame file at tree + subprocess: yes + - key: t + command: tig show {{.SelectedSubCommit.Sha}} + context: subCommits + description: tig commit (`t` again to browse files at revision) + subprocess: yes + - key: t + command: tig show {{.SelectedLocalBranch.Name}} + context: localBranches + description: tig branch (`t` again to browse files at revision) + subprocess: yes + - key: t + command: tig show {{.SelectedRemoteBranch.RemoteName}}/{{.SelectedRemoteBranch.Name}} + context: remoteBranches + description: tig branch (`t` again to browse files at revision) + subprocess: yes +``` + Example Usage on lazygit repo: - Search word: `lazygit` - Subtree/File: `**/commits.go`