Updated Custom Commands Compendium (markdown)

NikolayHD 2022-03-20 20:48:17 +03:00
parent 3aca417092
commit ad2479bd67

@ -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`