jesseduffield / jesseduffield/lazygit

Feature request: merge keys from multiple config.yml files instead of overriding

Open
#2,878 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

**Is your feature request related to a problem? Please describe.**
I have "public" and "private" config.yml files (one in my dotfiles repo and one in a private repo). If I define a `customCommands` key in both of them, it seems like the one in the second file overwrites the one in the first completely, even if the commands aren't redefined.

**Describe the solution you'd like**
I would like it if the config keys were merged, overwriting only matching subkeys (i.e. if I define the same command twice, the one loaded first should be overwritten)

Hope I'm not missing something here. I have this:
```yaml
export LG_CONFIG_FILE="$HOME/.config/lazygit/config.yml,$HOME/.config/lazygit/config_priv.yml"
```
and if I define `customCommands` in both, I lose any custom commands I defined in the first file.

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.