-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I think that the only thing missing for me is being able to query the user for custom input to these custom commands. E.g., I would like to create a custom command to create a new bookmark for the current revision. The command should support bookmark set --revision $change_id $inputs.bookmark_name
where $prompts
is an array of user inputs specified in the custom command, and the .bookmark_name
is the specific user input with the value inserted by the user when invoking the custom command through an interactive text field. Something like:
[custom_commands]
"new bookmark" = {
key = ["ctrl+b"],
args = ["bookmark", "set", "--revision", "$change_id", "$prompts.bookmark_name"],
prompts = [ {id = bookmark_name, type = "text", title = "Name of the new bookmark"} ]
}
The prompts.type
could be selecting from a menu (with filtering support), inputting a custom text, ...
Similarly to what Lazygit does with prompts:
- key: 'n'
context: 'localBranches'
prompts:
- type: 'menu'
title: 'What kind of branch is it?'
key: 'BranchType'
options:
- name: 'feature'
description: 'a feature branch'
value: 'feature'
- name: 'hotfix'
description: 'a hotfix branch'
value: 'hotfix'
- name: 'release'
description: 'a release branch'
value: 'release'
- type: 'input'
title: 'What is the new branch name?'
key: 'BranchName'
initialValue: ''
command: "git flow {{.Form.BranchType}} start {{.Form.BranchName}}"
loadingText: 'Creating branch'
Originally posted by @Adda0 in #63 (comment)
maralorn
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request