lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

Improve custom commands interface

Open Mihai22125 opened this issue 2 years ago • 0 comments

Allow a name to be specified in the prompt so that prompts can be referred by name.

- key : 'N'
    description: 'create annotated tag'
    command: "git tag -a {{ .Form.tagName }} -m \"{{ .Form.tagMessage }}\""
    context: 'tags'
    prompts:
      - type: 'input'
        title: 'Annotated tag name:'
        key: 'tagName'
      - type: 'input'
        title: 'Annotated tag message:'
        key: 'tagMessage'

Referring to prompt responses by index is kept in the code for backwards compatibility.

Add functionality for returning an error if the referred prompt is not defined.

This resolves: #2103

Mihai22125 avatar Aug 10 '22 13:08 Mihai22125