mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-04 23:37:41 +02:00
add confirmOnQuit config option
This commit is contained in:
parent
cf41338a9f
commit
e9268d1828
@ -20,6 +20,7 @@
|
|||||||
method: prompt # can be: prompt | background | never
|
method: prompt # can be: prompt | background | never
|
||||||
days: 14 # how often an update is checked for
|
days: 14 # how often an update is checked for
|
||||||
reporting: 'undetermined' # one of: 'on' | 'off' | 'undetermined'
|
reporting: 'undetermined' # one of: 'on' | 'off' | 'undetermined'
|
||||||
|
confirmOnQuit: false
|
||||||
```
|
```
|
||||||
|
|
||||||
## Platform Defaults:
|
## Platform Defaults:
|
||||||
|
@ -228,6 +228,7 @@ update:
|
|||||||
method: prompt # can be: prompt | background | never
|
method: prompt # can be: prompt | background | never
|
||||||
days: 14 # how often a update is checked for
|
days: 14 # how often a update is checked for
|
||||||
reporting: 'undetermined' # one of: 'on' | 'off' | 'undetermined'
|
reporting: 'undetermined' # one of: 'on' | 'off' | 'undetermined'
|
||||||
|
confirmOnQuit: false
|
||||||
`)
|
`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -411,5 +411,10 @@ func (gui *Gui) quit(g *gocui.Gui, v *gocui.View) error {
|
|||||||
if gui.State.Updating {
|
if gui.State.Updating {
|
||||||
return gui.createUpdateQuitConfirmation(g, v)
|
return gui.createUpdateQuitConfirmation(g, v)
|
||||||
}
|
}
|
||||||
|
if gui.Config.GetUserConfig().GetBool("confirmOnQuit") {
|
||||||
|
return gui.createConfirmationPanel(g, v, "", gui.Tr.SLocalize("ConfirmQuit"), func(g *gocui.Gui, v *gocui.View) error {
|
||||||
|
return gocui.ErrQuit
|
||||||
|
}, nil)
|
||||||
|
}
|
||||||
return gocui.ErrQuit
|
return gocui.ErrQuit
|
||||||
}
|
}
|
||||||
|
@ -295,6 +295,9 @@ func addDutch(i18nObject *i18n.Bundle) error {
|
|||||||
}, &i18n.Message{
|
}, &i18n.Message{
|
||||||
ID: "MergeAborted",
|
ID: "MergeAborted",
|
||||||
Other: "Merge afgebroken",
|
Other: "Merge afgebroken",
|
||||||
|
}, &i18n.Message{
|
||||||
|
ID: "ConfirmQuit",
|
||||||
|
Other: `Are you sure you want to quit?`,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -342,6 +342,9 @@ func addEnglish(i18nObject *i18n.Bundle) error {
|
|||||||
}, &i18n.Message{
|
}, &i18n.Message{
|
||||||
ID: "GitconfigParseErr",
|
ID: "GitconfigParseErr",
|
||||||
Other: `Gogit failed to parse your gitconfig file due to the presence of unquoted '\' characters. Removing these should fix the issue.`,
|
Other: `Gogit failed to parse your gitconfig file due to the presence of unquoted '\' characters. Removing these should fix the issue.`,
|
||||||
|
}, &i18n.Message{
|
||||||
|
ID: "ConfirmQuit",
|
||||||
|
Other: `Are you sure you want to quit?`,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -287,6 +287,9 @@ func addPolish(i18nObject *i18n.Bundle) error {
|
|||||||
}, &i18n.Message{
|
}, &i18n.Message{
|
||||||
ID: "MergeAborted",
|
ID: "MergeAborted",
|
||||||
Other: "Scalanie anulowane",
|
Other: "Scalanie anulowane",
|
||||||
|
}, &i18n.Message{
|
||||||
|
ID: "ConfirmQuit",
|
||||||
|
Other: `Na pewno chcesz wyjść z programu?`,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user