mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +02:00
use lowercase 'quote' for consistency with existing custom command template functions
This commit is contained in:
parent
b0c19b291f
commit
c953871ec7
3 changed files with 3 additions and 3 deletions
|
@ -8,7 +8,7 @@ customCommands:
|
||||||
command: 'hub browse -- "commit/{{.SelectedLocalCommit.Sha}}"'
|
command: 'hub browse -- "commit/{{.SelectedLocalCommit.Sha}}"'
|
||||||
context: 'commits'
|
context: 'commits'
|
||||||
- key: 'a'
|
- 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'
|
context: 'files'
|
||||||
description: 'toggle file staged'
|
description: 'toggle file staged'
|
||||||
- key: 'C'
|
- key: 'C'
|
||||||
|
|
|
@ -168,7 +168,7 @@ func (self *HandlerCreator) getResolveTemplateFn(form map[string]string, promptR
|
||||||
}
|
}
|
||||||
|
|
||||||
funcs := template.FuncMap{
|
funcs := template.FuncMap{
|
||||||
"Quote": self.os.Quote,
|
"quote": self.os.Quote,
|
||||||
}
|
}
|
||||||
|
|
||||||
return func(templateStr string) (string, error) { return utils.ResolveTemplate(templateStr, objects, funcs) }
|
return func(templateStr string) (string, error) { return utils.ResolveTemplate(templateStr, objects, funcs) }
|
||||||
|
|
|
@ -17,7 +17,7 @@ var FormPrompts = NewIntegrationTest(NewIntegrationTestArgs{
|
||||||
{
|
{
|
||||||
Key: "a",
|
Key: "a",
|
||||||
Context: "files",
|
Context: "files",
|
||||||
Command: `echo {{.Form.FileContent | Quote}} > {{.Form.FileName | Quote}}`,
|
Command: `echo {{.Form.FileContent | quote}} > {{.Form.FileName | quote}}`,
|
||||||
Prompts: []config.CustomCommandPrompt{
|
Prompts: []config.CustomCommandPrompt{
|
||||||
{
|
{
|
||||||
Key: "FileName",
|
Key: "FileName",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue