Skip to content

Commit c953871

Browse files
committed
use lowercase 'quote' for consistency with existing custom command template functions
1 parent b0c19b2 commit c953871

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/Custom_Command_Keybindings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ customCommands:
88
command: 'hub browse -- "commit/{{.SelectedLocalCommit.Sha}}"'
99
context: 'commits'
1010
- key: 'a'
11-
command: "git {{if .SelectedFile.HasUnstagedChanges}} add {{else}} reset {{end}} {{.SelectedFile.Name | Quote}}"
11+
command: "git {{if .SelectedFile.HasUnstagedChanges}} add {{else}} reset {{end}} {{.SelectedFile.Name | quote}}"
1212
context: 'files'
1313
description: 'toggle file staged'
1414
- key: 'C'

pkg/gui/services/custom_commands/handler_creator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func (self *HandlerCreator) getResolveTemplateFn(form map[string]string, promptR
168168
}
169169

170170
funcs := template.FuncMap{
171-
"Quote": self.os.Quote,
171+
"quote": self.os.Quote,
172172
}
173173

174174
return func(templateStr string) (string, error) { return utils.ResolveTemplate(templateStr, objects, funcs) }

pkg/integration/tests/custom_commands/form_prompts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var FormPrompts = NewIntegrationTest(NewIntegrationTestArgs{
1717
{
1818
Key: "a",
1919
Context: "files",
20-
Command: `echo {{.Form.FileContent | Quote}} > {{.Form.FileName | Quote}}`,
20+
Command: `echo {{.Form.FileContent | quote}} > {{.Form.FileName | quote}}`,
2121
Prompts: []config.CustomCommandPrompt{
2222
{
2323
Key: "FileName",

0 commit comments

Comments
 (0)