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:
@ -47,9 +47,9 @@ var FilterUpdatesWhenModelChanges = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
t.Views().Files().Focus()
|
||||
|
||||
// To do that, we use a custom command to create a new branch that matches the filter
|
||||
t.GlobalPress(keys.Universal.ExecuteCustomCommand)
|
||||
t.GlobalPress(keys.Universal.ExecuteShellCommand)
|
||||
t.ExpectPopup().Prompt().
|
||||
Title(Equals("Custom command:")).
|
||||
Title(Equals("Shell command:")).
|
||||
Type("git branch new-branch").
|
||||
Confirm()
|
||||
|
||||
|
@ -17,10 +17,10 @@ var BasicShellCommand = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
t.Views().Files().
|
||||
IsEmpty().
|
||||
IsFocused().
|
||||
Press(keys.Universal.ExecuteCustomCommand)
|
||||
Press(keys.Universal.ExecuteShellCommand)
|
||||
|
||||
t.ExpectPopup().Prompt().
|
||||
Title(Equals("Custom command:")).
|
||||
Title(Equals("Shell command:")).
|
||||
Type("touch file.txt").
|
||||
Confirm()
|
||||
|
||||
|
@ -17,10 +17,10 @@ var ComplexShellCommand = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
t.Views().Files().
|
||||
IsEmpty().
|
||||
IsFocused().
|
||||
Press(keys.Universal.ExecuteCustomCommand)
|
||||
Press(keys.Universal.ExecuteShellCommand)
|
||||
|
||||
t.ExpectPopup().Prompt().
|
||||
Title(Equals("Custom command:")).
|
||||
Title(Equals("Shell command:")).
|
||||
Type("sh -c \"touch file.txt\"").
|
||||
Confirm()
|
||||
|
||||
|
@ -13,9 +13,9 @@ var DeleteFromHistory = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
SetupConfig: func(cfg *config.AppConfig) {},
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
createCustomCommand := func(command string) {
|
||||
t.GlobalPress(keys.Universal.ExecuteCustomCommand)
|
||||
t.GlobalPress(keys.Universal.ExecuteShellCommand)
|
||||
t.ExpectPopup().Prompt().
|
||||
Title(Equals("Custom command:")).
|
||||
Title(Equals("Shell command:")).
|
||||
Type(command).
|
||||
Confirm()
|
||||
}
|
||||
@ -24,9 +24,9 @@ var DeleteFromHistory = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
createCustomCommand("echo 2")
|
||||
createCustomCommand("echo 3")
|
||||
|
||||
t.GlobalPress(keys.Universal.ExecuteCustomCommand)
|
||||
t.GlobalPress(keys.Universal.ExecuteShellCommand)
|
||||
t.ExpectPopup().Prompt().
|
||||
Title(Equals("Custom command:")).
|
||||
Title(Equals("Shell command:")).
|
||||
SuggestionLines(
|
||||
Contains("3"),
|
||||
Contains("2"),
|
||||
|
@ -12,15 +12,15 @@ var EditHistory = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
SetupRepo: func(shell *Shell) {},
|
||||
SetupConfig: func(cfg *config.AppConfig) {},
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.GlobalPress(keys.Universal.ExecuteCustomCommand)
|
||||
t.GlobalPress(keys.Universal.ExecuteShellCommand)
|
||||
t.ExpectPopup().Prompt().
|
||||
Title(Equals("Custom command:")).
|
||||
Title(Equals("Shell command:")).
|
||||
Type("echo x").
|
||||
Confirm()
|
||||
|
||||
t.GlobalPress(keys.Universal.ExecuteCustomCommand)
|
||||
t.GlobalPress(keys.Universal.ExecuteShellCommand)
|
||||
t.ExpectPopup().Prompt().
|
||||
Title(Equals("Custom command:")).
|
||||
Title(Equals("Shell command:")).
|
||||
Type("ec").
|
||||
SuggestionLines(
|
||||
Equals("echo x"),
|
||||
|
@ -12,22 +12,22 @@ var History = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
SetupRepo: func(shell *Shell) {},
|
||||
SetupConfig: func(cfg *config.AppConfig) {},
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.GlobalPress(keys.Universal.ExecuteCustomCommand)
|
||||
t.GlobalPress(keys.Universal.ExecuteShellCommand)
|
||||
t.ExpectPopup().Prompt().
|
||||
Title(Equals("Custom command:")).
|
||||
Title(Equals("Shell command:")).
|
||||
Type("echo 1").
|
||||
Confirm()
|
||||
|
||||
t.GlobalPress(keys.Universal.ExecuteCustomCommand)
|
||||
t.GlobalPress(keys.Universal.ExecuteShellCommand)
|
||||
t.ExpectPopup().Prompt().
|
||||
Title(Equals("Custom command:")).
|
||||
Title(Equals("Shell command:")).
|
||||
SuggestionLines(Contains("1")).
|
||||
Type("echo 2").
|
||||
Confirm()
|
||||
|
||||
t.GlobalPress(keys.Universal.ExecuteCustomCommand)
|
||||
t.GlobalPress(keys.Universal.ExecuteShellCommand)
|
||||
t.ExpectPopup().Prompt().
|
||||
Title(Equals("Custom command:")).
|
||||
Title(Equals("Shell command:")).
|
||||
SuggestionLines(
|
||||
// "echo 2" was typed last, so it should come first
|
||||
Contains("2"),
|
||||
@ -36,9 +36,9 @@ var History = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Type("echo 3").
|
||||
Confirm()
|
||||
|
||||
t.GlobalPress(keys.Universal.ExecuteCustomCommand)
|
||||
t.GlobalPress(keys.Universal.ExecuteShellCommand)
|
||||
t.ExpectPopup().Prompt().
|
||||
Title(Equals("Custom command:")).
|
||||
Title(Equals("Shell command:")).
|
||||
SuggestionLines(
|
||||
Contains("3"),
|
||||
Contains("2"),
|
||||
@ -48,9 +48,9 @@ var History = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Confirm()
|
||||
|
||||
// Executing a command again should move it to the front:
|
||||
t.GlobalPress(keys.Universal.ExecuteCustomCommand)
|
||||
t.GlobalPress(keys.Universal.ExecuteShellCommand)
|
||||
t.ExpectPopup().Prompt().
|
||||
Title(Equals("Custom command:")).
|
||||
Title(Equals("Shell command:")).
|
||||
SuggestionLines(
|
||||
Contains("1"),
|
||||
Contains("3"),
|
||||
|
@ -14,23 +14,23 @@ var OmitFromHistory = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
},
|
||||
SetupConfig: func(cfg *config.AppConfig) {},
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.GlobalPress(keys.Universal.ExecuteCustomCommand)
|
||||
t.GlobalPress(keys.Universal.ExecuteShellCommand)
|
||||
t.ExpectPopup().Prompt().
|
||||
Title(Equals("Custom command:")).
|
||||
Title(Equals("Shell command:")).
|
||||
Type("echo aubergine").
|
||||
Confirm()
|
||||
|
||||
t.GlobalPress(keys.Universal.ExecuteCustomCommand)
|
||||
t.GlobalPress(keys.Universal.ExecuteShellCommand)
|
||||
t.ExpectPopup().Prompt().
|
||||
Title(Equals("Custom command:")).
|
||||
Title(Equals("Shell command:")).
|
||||
SuggestionLines(Contains("aubergine")).
|
||||
SuggestionLines(DoesNotContain("tangerine")).
|
||||
Type(" echo tangerine").
|
||||
Confirm()
|
||||
|
||||
t.GlobalPress(keys.Universal.ExecuteCustomCommand)
|
||||
t.GlobalPress(keys.Universal.ExecuteShellCommand)
|
||||
t.ExpectPopup().Prompt().
|
||||
Title(Equals("Custom command:")).
|
||||
Title(Equals("Shell command:")).
|
||||
SuggestionLines(Contains("aubergine")).
|
||||
SuggestionLines(DoesNotContain("tangerine")).
|
||||
Cancel()
|
||||
|
Reference in New Issue
Block a user