summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorMark Kopenga <mkopenga@gmail.com>2021-08-07 15:24:42 +0200
committerGitHub <noreply@github.com>2021-08-07 15:24:42 +0200
commit5d1a9639b6dc7f2a5267cb2f919f96a6f7bd95d1 (patch)
tree16806108fca2c01fc78877c47eb7702698ea019c /docs
parentfd8cb6e6d7b4a38ca2e57be80b506b66515552ae (diff)
parentea136e4e77259e27db0b89a88d7d57cad6062d1e (diff)
Merge pull request #1416 from FoamScience/feature_menuOptions
Diffstat (limited to 'docs')
-rw-r--r--docs/Custom_Command_Keybindings.md36
1 files changed, 22 insertions, 14 deletions
diff --git a/docs/Custom_Command_Keybindings.md b/docs/Custom_Command_Keybindings.md
index 9dc42a9da..c48442362 100644
--- a/docs/Custom_Command_Keybindings.md
+++ b/docs/Custom_Command_Keybindings.md
@@ -47,7 +47,8 @@ customCommands:
title: 'Remote branch:'
command: 'git branch -r --list {{index .PromptResponses 0}}/*'
filter: '.*{{index .PromptResponses 0}}/(?P<branch>.*)'
- format: '{{ .branch }}'
+ valueFormat: '{{ .branch }}'
+ labelFormat: ''
```
Looking at the command assigned to the 'n' key, here's what the result looks like:
@@ -92,19 +93,26 @@ The permitted contexts are:
The permitted prompt fields are:
-| _field_ | _description_ | _required_ |
-| ------------ | -------------------------------------------------------------------------------- | ---------- |
-| type | one of 'input' or 'menu' | yes |
-| title | the title to display in the popup panel | no |
-| initialValue | (only applicable to 'input' prompts) the initial value to appear in the text box | no |
-| options | (only applicable to 'menu' prompts) the options to display in the menu | no |
-| command | (only applicable to 'menuFromCommand' prompts) the command to run to generate | yes |
-| | menu options | |
-| filter | (only applicable to 'menuFromCommand' prompts) the regexp to run specifying | yes |
-| | groups which are going to be kept from the command's output | |
-| format | (only applicable to 'menuFromCommand' prompts) how to format matched groups from | yes |
-| | the filter. You can use named groups, or `{{ .group_GROUPID }}`. | yes |
-| | PS: named groups keep first match only | yes |
+| _field_ | _description_ | _required_ |
+| ------------ | -------------------------------------------------------------------------------- | ---------- |
+| type | one of 'input' or 'menu' | yes |
+| title | the title to display in the popup panel | no |
+| initialValue | (only applicable to 'input' prompts) the initial value to appear in the text box | no |
+| options | (only applicable to 'menu' prompts) the options to display in the menu | no |
+| command | (only applicable to 'menuFromCommand' prompts) the command to run to generate | yes |
+| | menu options | |
+| filter | (only applicable to 'menuFromCommand' prompts) the regexp to run specifying | yes |
+| | groups which are going to be kept from the command's output | |
+| valueFormat | (only applicable to 'menuFromCommand' prompts) how to format matched groups from | yes |
+| | the filter to construct a menu item's value (What gets appended to prompt | |
+| | responses when the item is selected). You can use named groups, | |
+| | or `{{ .group_GROUPID }}`. | |
+| | PS: named groups keep first match only | |
+| labelFormat | (only applicable to 'menuFromCommand' prompts) how to format matched groups from | no |
+| | the filter to construct the item's label (What's shown on screen). You can use | |
+| | named groups, or `{{ .group_GROUPID }}`. If this is not specified, `valueFormat` | |
+| | is shown instead. | |
+| | PS: named groups keep first match only | |
The permitted option fields are:
| _field_ | _description_ | _required_ |