Skip to content

Commit dbca930

Browse files
committed
Rename "Custom Command" to "Shell Command"
The double use of the term "Custom Command" for both shell commands and user-configured keybindings was confusing.
1 parent 0cbe08b commit dbca930

22 files changed

+77
-69
lines changed

docs/Config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ keybinding:
495495
scrollDownMain-alt1: J
496496
scrollUpMain-alt2: <c-u>
497497
scrollDownMain-alt2: <c-d>
498-
executeCustomCommand: ':'
498+
executeShellCommand: ':'
499499
createRebaseOptionsMenu: m
500500

501501
# 'Files' appended for legacy reasons

docs/keybindings/Keybindings_en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
1818
| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename. |
1919
| `` } `` | Increase diff context size | Increase the amount of the context shown around changes in the diff view. |
2020
| `` { `` | Decrease diff context size | Decrease the amount of the context shown around changes in the diff view. |
21-
| `` : `` | Execute custom command | Bring up a prompt where you can enter a shell command to execute. Not to be confused with pre-configured custom commands. |
21+
| `` : `` | Execute shell command | Bring up a prompt where you can enter a shell command to execute. |
2222
| `` <c-p> `` | View custom patch options | |
2323
| `` m `` | View merge/rebase options | View options to abort/continue/skip the current merge/rebase. |
2424
| `` R `` | Refresh | Refresh the git state (i.e. run `git status`, `git branch`, etc in background to update the contents of panels). This does not run `git fetch`. |

docs/keybindings/Keybindings_ja.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
1818
| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename. |
1919
| `` } `` | Increase diff context size | Increase the amount of the context shown around changes in the diff view. |
2020
| `` { `` | Decrease diff context size | Decrease the amount of the context shown around changes in the diff view. |
21-
| `` : `` | カスタムコマンドを実行 | Bring up a prompt where you can enter a shell command to execute. Not to be confused with pre-configured custom commands. |
21+
| `` : `` | Execute shell command | Bring up a prompt where you can enter a shell command to execute. |
2222
| `` <c-p> `` | View custom patch options | |
2323
| `` m `` | View merge/rebase options | View options to abort/continue/skip the current merge/rebase. |
2424
| `` R `` | リフレッシュ | Refresh the git state (i.e. run `git status`, `git branch`, etc in background to update the contents of panels). This does not run `git fetch`. |

docs/keybindings/Keybindings_ko.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
1818
| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename. |
1919
| `` } `` | Diff 보기의 변경 사항 주위에 표시되는 컨텍스트의 크기를 늘리기 | Increase the amount of the context shown around changes in the diff view. |
2020
| `` { `` | Diff 보기의 변경 사항 주위에 표시되는 컨텍스트 크기 줄이기 | Decrease the amount of the context shown around changes in the diff view. |
21-
| `` : `` | Execute custom command | Bring up a prompt where you can enter a shell command to execute. Not to be confused with pre-configured custom commands. |
21+
| `` : `` | Execute shell command | Bring up a prompt where you can enter a shell command to execute. |
2222
| `` <c-p> `` | 커스텀 Patch 옵션 보기 | |
2323
| `` m `` | View merge/rebase options | View options to abort/continue/skip the current merge/rebase. |
2424
| `` R `` | 새로고침 | Refresh the git state (i.e. run `git status`, `git branch`, etc in background to update the contents of panels). This does not run `git fetch`. |

docs/keybindings/Keybindings_nl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
1818
| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename. |
1919
| `` } `` | Increase diff context size | Increase the amount of the context shown around changes in the diff view. |
2020
| `` { `` | Decrease diff context size | Decrease the amount of the context shown around changes in the diff view. |
21-
| `` : `` | Voer aangepaste commando uit | Bring up a prompt where you can enter a shell command to execute. Not to be confused with pre-configured custom commands. |
21+
| `` : `` | Execute shell command | Bring up a prompt where you can enter a shell command to execute. |
2222
| `` <c-p> `` | Bekijk aangepaste patch opties | |
2323
| `` m `` | Bekijk merge/rebase opties | View options to abort/continue/skip the current merge/rebase. |
2424
| `` R `` | Verversen | Refresh the git state (i.e. run `git status`, `git branch`, etc in background to update the contents of panels). This does not run `git fetch`. |

docs/keybindings/Keybindings_pl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ _Legenda: `<c-b>` oznacza ctrl+b, `<a-b>` oznacza alt+b, `B` oznacza shift+b_
1818
| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename. |
1919
| `` } `` | Zwiększ rozmiar kontekstu w widoku różnic | Zwiększ ilość kontekstu pokazywanego wokół zmian w widoku różnic. |
2020
| `` { `` | Zmniejsz rozmiar kontekstu w widoku różnic | Zmniejsz ilość kontekstu pokazywanego wokół zmian w widoku różnic. |
21-
| `` : `` | Wykonaj polecenie niestandardowe | Wyświetl monit, w którym możesz wprowadzić polecenie powłoki do wykonania. Nie należy mylić z wcześniej skonfigurowanymi poleceniami niestandardowymi. |
21+
| `` : `` | Execute shell command | Bring up a prompt where you can enter a shell command to execute. |
2222
| `` <c-p> `` | Wyświetl opcje niestandardowej łatki | |
2323
| `` m `` | Pokaż opcje scalania/rebase | Pokaż opcje do przerwania/kontynuowania/pominięcia bieżącego scalania/rebase. |
2424
| `` R `` | Odśwież | Odśwież stan git (tj. uruchom `git status`, `git branch`, itp. w tle, aby zaktualizować zawartość paneli). To nie uruchamia `git fetch`. |

docs/keybindings/Keybindings_ru.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ _Связки клавиш_
1818
| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename. |
1919
| `` } `` | Увеличить размер контекста, отображаемого вокруг изменений в просмотрщике сравнении | Increase the amount of the context shown around changes in the diff view. |
2020
| `` { `` | Уменьшите размер контекста, отображаемого вокруг изменений в просмотрщике сравнении | Decrease the amount of the context shown around changes in the diff view. |
21-
| `` : `` | Выполнить пользовательскую команду | Bring up a prompt where you can enter a shell command to execute. Not to be confused with pre-configured custom commands. |
21+
| `` : `` | Execute shell command | Bring up a prompt where you can enter a shell command to execute. |
2222
| `` <c-p> `` | Просмотреть пользовательские параметры патча | |
2323
| `` m `` | Просмотреть параметры слияния/перебазирования | View options to abort/continue/skip the current merge/rebase. |
2424
| `` R `` | Обновить | Refresh the git state (i.e. run `git status`, `git branch`, etc in background to update the contents of panels). This does not run `git fetch`. |

docs/keybindings/Keybindings_zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ _Legend: `<c-b>` means ctrl+b, `<a-b>` means alt+b, `B` means shift+b_
1818
| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename. |
1919
| `` } `` | 扩大差异视图中显示的上下文范围 | Increase the amount of the context shown around changes in the diff view. |
2020
| `` { `` | 缩小差异视图中显示的上下文范围 | Decrease the amount of the context shown around changes in the diff view. |
21-
| `` : `` | 执行自定义命令 | Bring up a prompt where you can enter a shell command to execute. Not to be confused with pre-configured custom commands. |
21+
| `` : `` | Execute shell command | Bring up a prompt where you can enter a shell command to execute. |
2222
| `` <c-p> `` | 查看自定义补丁选项 | |
2323
| `` m `` | 查看 合并/变基 选项 | View options to abort/continue/skip the current merge/rebase. |
2424
| `` R `` | 刷新 | Refresh the git state (i.e. run `git status`, `git branch`, etc in background to update the contents of panels). This does not run `git fetch`. |

docs/keybindings/Keybindings_zh-TW.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ _說明:`<c-b>` 表示 Ctrl+B、`<a-b>` 表示 Alt+B,`B`表示 Shift+B
1818
| `` ( `` | Decrease rename similarity threshold | Decrease the similarity threshold for a deletion and addition pair to be treated as a rename. |
1919
| `` } `` | 增加差異檢視中顯示變更周圍上下文的大小 | Increase the amount of the context shown around changes in the diff view. |
2020
| `` { `` | 減小差異檢視中顯示變更周圍上下文的大小 | Decrease the amount of the context shown around changes in the diff view. |
21-
| `` : `` | 執行自訂命令 | Bring up a prompt where you can enter a shell command to execute. Not to be confused with pre-configured custom commands. |
21+
| `` : `` | Execute shell command | Bring up a prompt where you can enter a shell command to execute. |
2222
| `` <c-p> `` | 檢視自訂補丁選項 | |
2323
| `` m `` | 查看合併/變基選項 | View options to abort/continue/skip the current merge/rebase. |
2424
| `` R `` | 重新整理 | Refresh the git state (i.e. run `git status`, `git branch`, etc in background to update the contents of panels). This does not run `git fetch`. |

pkg/config/app_config.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,12 @@ func migrateUserConfig(path string, content []byte) ([]byte, error) {
184184
return nil, fmt.Errorf("Couldn't migrate config file at `%s`: %s", path, err)
185185
}
186186

187+
changedContent, err = yaml_utils.RenameYamlKey(changedContent, []string{"keybinding", "universal", "executeCustomCommand"},
188+
"executeShellCommand")
189+
if err != nil {
190+
return nil, fmt.Errorf("Couldn't migrate config file at `%s`: %s", path, err)
191+
}
192+
187193
changedContent, err = changeNullKeybindingsToDisabled(changedContent)
188194
if err != nil {
189195
return nil, fmt.Errorf("Couldn't migrate config file at `%s`: %s", path, err)
@@ -365,8 +371,10 @@ type AppState struct {
365371
StartupPopupVersion int
366372
LastVersion string // this is the last version the user was using, for the purpose of showing release notes
367373

368-
// these are for custom commands typed in directly, not for custom commands in the lazygit config
369-
CustomCommandsHistory []string
374+
// these are for shell commands typed in directly, not for custom commands in the lazygit config.
375+
// For backwards compatibility we keep the old name in yaml files.
376+
ShellCommandsHistory []string `yaml:"customcommandshistory"`
377+
370378
HideCommandLog bool
371379
IgnoreWhitespaceInDiffView bool
372380
DiffContextSize int

0 commit comments

Comments
 (0)