1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Rename "Custom Command" to "Shell Command"

The double use of the term "Custom Command" for both shell commands and
user-configured keybindings was confusing.
This commit is contained in:
Stefan Haller
2024-08-06 10:47:43 +02:00
parent 0cbe08b105
commit dbca9306de
22 changed files with 77 additions and 69 deletions

View File

@ -184,6 +184,12 @@ func migrateUserConfig(path string, content []byte) ([]byte, error) {
return nil, fmt.Errorf("Couldn't migrate config file at `%s`: %s", path, err)
}
changedContent, err = yaml_utils.RenameYamlKey(changedContent, []string{"keybinding", "universal", "executeCustomCommand"},
"executeShellCommand")
if err != nil {
return nil, fmt.Errorf("Couldn't migrate config file at `%s`: %s", path, err)
}
changedContent, err = changeNullKeybindingsToDisabled(changedContent)
if err != nil {
return nil, fmt.Errorf("Couldn't migrate config file at `%s`: %s", path, err)
@ -365,8 +371,10 @@ type AppState struct {
StartupPopupVersion int
LastVersion string // this is the last version the user was using, for the purpose of showing release notes
// these are for custom commands typed in directly, not for custom commands in the lazygit config
CustomCommandsHistory []string
// these are for shell commands typed in directly, not for custom commands in the lazygit config.
// For backwards compatibility we keep the old name in yaml files.
ShellCommandsHistory []string `yaml:"customcommandshistory"`
HideCommandLog bool
IgnoreWhitespaceInDiffView bool
DiffContextSize int