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`