summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-10-02 18:42:51 -0700
committerJesse Duffield <jessedduffield@gmail.com>2022-10-02 18:43:25 -0700
commitc953871ec76528f638af8613d40051cd6c48be72 (patch)
treed21786bf52a12f8c44f19a9a28f0f7573d3da96e
parentb0c19b291ff50575d1911d58c8d9058bef1c9db8 (diff)
use lowercase 'quote' for consistency with existing custom command template functions
-rw-r--r--docs/Custom_Command_Keybindings.md2
-rw-r--r--pkg/gui/services/custom_commands/handler_creator.go2
-rw-r--r--pkg/integration/tests/custom_commands/form_prompts.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/docs/Custom_Command_Keybindings.md b/docs/Custom_Command_Keybindings.md
index 09708d54c..62a034ecf 100644
--- a/docs/Custom_Command_Keybindings.md
+++ b/docs/Custom_Command_Keybindings.md
@@ -8,7 +8,7 @@ customCommands:
command: 'hub browse -- "commit/{{.SelectedLocalCommit.Sha}}"'
context: 'commits'
- key: 'a'
- command: "git {{if .SelectedFile.HasUnstagedChanges}} add {{else}} reset {{end}} {{.SelectedFile.Name | Quote}}"
+ command: "git {{if .SelectedFile.HasUnstagedChanges}} add {{else}} reset {{end}} {{.SelectedFile.Name | quote}}"
context: 'files'
description: 'toggle file staged'
- key: 'C'
diff --git a/pkg/gui/services/custom_commands/handler_creator.go b/pkg/gui/services/custom_commands/handler_creator.go
index 9b30041e3..bad972bd6 100644
--- a/pkg/gui/services/custom_commands/handler_creator.go
+++ b/pkg/gui/services/custom_commands/handler_creator.go
@@ -168,7 +168,7 @@ func (self *HandlerCreator) getResolveTemplateFn(form map[string]string, promptR
}
funcs := template.FuncMap{
- "Quote": self.os.Quote,
+ "quote": self.os.Quote,
}
return func(templateStr string) (string, error) { return utils.ResolveTemplate(templateStr, objects, funcs) }
diff --git a/pkg/integration/tests/custom_commands/form_prompts.go b/pkg/integration/tests/custom_commands/form_prompts.go
index 4148c767a..5d9403107 100644
--- a/pkg/integration/tests/custom_commands/form_prompts.go
+++ b/pkg/integration/tests/custom_commands/form_prompts.go
@@ -17,7 +17,7 @@ var FormPrompts = NewIntegrationTest(NewIntegrationTestArgs{
{
Key: "a",
Context: "files",
- Command: `echo {{.Form.FileContent | Quote}} > {{.Form.FileName | Quote}}`,
+ Command: `echo {{.Form.FileContent | quote}} > {{.Form.FileName | quote}}`,
Prompts: []config.CustomCommandPrompt{
{
Key: "FileName",