mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-07 22:02:56 +03:00
allow skipping confirmation prompt after opening subprocess
This commit is contained in:
committed by
Jesse Duffield
parent
28c9d85141
commit
7be25a105d
@@ -95,6 +95,7 @@ confirmOnQuit: false
|
|||||||
quitOnTopLevelReturn: false
|
quitOnTopLevelReturn: false
|
||||||
disableStartupPopups: false
|
disableStartupPopups: false
|
||||||
notARepository: 'prompt' # one of: 'prompt' | 'create' | 'skip'
|
notARepository: 'prompt' # one of: 'prompt' | 'create' | 'skip'
|
||||||
|
promptToReturnFromSubprocess: true # display confirmation when subprocess terminates
|
||||||
keybinding:
|
keybinding:
|
||||||
universal:
|
universal:
|
||||||
quit: 'q'
|
quit: 'q'
|
||||||
|
@@ -16,6 +16,7 @@ type UserConfig struct {
|
|||||||
CustomCommands []CustomCommand `yaml:"customCommands"`
|
CustomCommands []CustomCommand `yaml:"customCommands"`
|
||||||
Services map[string]string `yaml:"services"`
|
Services map[string]string `yaml:"services"`
|
||||||
NotARepository string `yaml:"notARepository"`
|
NotARepository string `yaml:"notARepository"`
|
||||||
|
PromptToReturnFromSubprocess bool `yaml:"promptToReturnFromSubprocess"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type RefresherConfig struct {
|
type RefresherConfig struct {
|
||||||
@@ -540,5 +541,6 @@ func GetDefaultConfig() *UserConfig {
|
|||||||
CustomCommands: []CustomCommand(nil),
|
CustomCommands: []CustomCommand(nil),
|
||||||
Services: map[string]string(nil),
|
Services: map[string]string(nil),
|
||||||
NotARepository: "prompt",
|
NotARepository: "prompt",
|
||||||
|
PromptToReturnFromSubprocess: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -675,8 +675,10 @@ func (gui *Gui) runSubprocess(cmdObj oscommands.ICmdObj) error { //nolint:unpara
|
|||||||
subprocess.Stderr = ioutil.Discard
|
subprocess.Stderr = ioutil.Discard
|
||||||
subprocess.Stdin = nil
|
subprocess.Stdin = nil
|
||||||
|
|
||||||
fmt.Fprintf(os.Stdout, "\n%s\n", style.FgGreen.Sprint(gui.Tr.PressEnterToReturn))
|
if gui.Config.GetUserConfig().PromptToReturnFromSubprocess {
|
||||||
|
fmt.Fprintf(os.Stdout, "\n%s", style.FgGreen.Sprint(gui.Tr.PressEnterToReturn))
|
||||||
fmt.Scanln() // wait for enter press
|
fmt.Scanln() // wait for enter press
|
||||||
|
}
|
||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user