diff --git a/Custom-Commands-Compendium.md b/Custom-Commands-Compendium.md index c35a94d..c802b5b 100644 --- a/Custom-Commands-Compendium.md +++ b/Custom-Commands-Compendium.md @@ -102,7 +102,7 @@ customCommands: ```yml customCommands: - - key : '' # Out of sane keybindings in commits context :( + - key : '' description: 'Search the whole history (From a ref and down) for an expression in a file' command: "git checkout {{index .PromptResponses 3}}" context: 'commits' @@ -117,10 +117,12 @@ customCommands: - type: 'menuFromCommand' title: 'Commits:' command: "git log --oneline {{index .PromptResponses 2}} -S'{{index .PromptResponses 0}}' --all -- {{index .PromptResponses 1}}" - filter: '(?P[0-9a-zA-Z]+) .*' # or just '(?P.*)' to catch commit descriptions too - format: '{{ .commit_id }}' + filter: '(?P[0-9a-zA-Z]*) *(?P.*)' + valueFormat: '{{ .commit_id }}' + labelFormat: '{{ .commit_id | green | bold }} - {{ .commit_msg | yellow }}' ``` Example Usage on lazygit repo: - Search word: `lazygit` - Subtree/File: `**/commits.go` - - Ref: `master` \ No newline at end of file + - Ref: `master` +Note also that color functions are supported in `labelFormat` \ No newline at end of file