Updated Custom Commands Compendium (markdown)

Jesse Duffield 2020-11-21 17:33:52 +11:00
parent 4a073ad29a
commit b8a11d164f

@ -4,7 +4,7 @@ If you want to know how to implement your own custom commands see [here](https:/
## Creating a review in [Gerrit](https://gerrit-review.googlesource.com/Documentation/intro-gerrit-walkthrough.html) ## Creating a review in [Gerrit](https://gerrit-review.googlesource.com/Documentation/intro-gerrit-walkthrough.html)
``` ```yml
customCommands: customCommands:
- key: '<c-p>' - key: '<c-p>'
command: "git push origin HEAD:refs/for/{{.CheckedOutBranch.Name}}" command: "git push origin HEAD:refs/for/{{.CheckedOutBranch.Name}}"
@ -14,7 +14,7 @@ customCommands:
## Pushing to a specific remote branch ## Pushing to a specific remote branch
``` ```yml
customCommands: customCommands:
- key: '<c-p>' - key: '<c-p>'
context: 'global' context: 'global'
@ -26,7 +26,7 @@ customCommands:
``` ```
## Creating an annotated tag ## Creating an annotated tag
``` ```yml
- key : 'N' - key : 'N'
description: 'create annotated tag' description: 'create annotated tag'
command: "git tag -a {{index .PromptResponses 0}} -m \"{{index .PromptResponses 1}}\"" command: "git tag -a {{index .PromptResponses 0}} -m \"{{index .PromptResponses 1}}\""
@ -40,7 +40,7 @@ customCommands:
## Open GitHub Pull Request ## Open GitHub Pull Request
``` ```yml
customCommands: customCommands:
- key: "<c-r>" - key: "<c-r>"
command: "gh pr create --fill --web" command: "gh pr create --fill --web"
@ -52,7 +52,7 @@ This can be customized to fit your needs. Run `gh pr create --help` to see what
## Checkout branch via Github Pull Request id ## Checkout branch via Github Pull Request id
``` ```yml
customCommands: customCommands:
- key: "v" # couldn't think of a better keybinding - key: "v" # couldn't think of a better keybinding
prompts: prompts:
@ -62,3 +62,13 @@ customCommands:
context: "localBranches" context: "localBranches"
loadingText: "checking out PR" loadingText: "checking out PR"
``` ```
## Opening git mergetool
```yml
- key: "M"
command: "git mergetool {{ .SelectedFile.Name }}"
context: "files"
loadingText: "opening git mergetool"
subprocess: true
```