jesseduffield / jesseduffield/lazygit

Key bindings in custom commands are all mapped to lower cases

Open
#3,470 6 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

**Describe the bug**
In my config.yaml I've set two custom commands to push and pull to specific remotes and branches. This part of the config is shown as below

```
customCommands:
- key: ''
description: "Pull from a specific remote repository"
context: 'files'
loadingText: 'Pulling ...'
command: git pull {{ .Form.Remote }} {{ .Form.RemoteBranch }}
prompts:
- type: 'input'
key: 'Remote'
title: "Remote:"
suggestions:
preset: 'remotes'
- type: 'input'
key: 'RemoteBranch'
title: "Remote branch:"
suggestions:
command: "git branch --remote --list '{{.Form.Remote}}/*' --format='%(refname:short)' | sed 's/{{.Form.Remote}}\\///'"
- key: '' # '' will not work?, seems to be same as '', please use '?' in file panel to bring up the keybindings menu
description: "Push to a specific remote repository"
context: 'files'
loadingText: 'Pus hing ...'
command: git push {{ .Form.Remote }} {{ .Form.RemoteBranch }}
prompts:
- type: 'input'
key: 'Remote'
title: "Remote:"
suggestions:
preset: 'remotes'
- type: 'input'
key: 'RemoteBranch'
title: "Remote branch:"
suggestions:
command: "git branch --remote --list '{{.Form.Remote}}/*' --format='%(refname:short)' | sed 's/{{.Form.Remote}}\\///'"
```

The key bindings for these two commands are `` and ``. But in actuality they are all mapped to `` in lazygit, see the screenshot below:

![lazygit_keybinding_problems](https://github.com/jesseduffield/lazygit/assets/12522724/31837cee-fde6-4a2f-a99e-8ebd803cfc06)

**To Reproduce**
As described in the bug description

**Expected behavior**
I'm not sure whether the custom command keybindings support the capital letter or am I just missing some config settings to setup a keybinding with capital letter.

**Version info:**
lazygit version:
commit=3675570a391b1a49ddd198b4c7e71e17701d4404, build date=2024-03-23T09:09:11Z, build source=binaryRelease, version=0.41.0, os=windows, arch=amd64, git version=2.43.0.windows.1

git version:
git version 2.43.0.windows.1

**Note:** please try updating to the latest version or [manually building](https://github.com/jesseduffield/lazygit/#manual) the latest `master` to see if the issue still occurs.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.