1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-29 22:48:24 +02:00

add config flag

This commit is contained in:
Dawid Dziurla
2018-08-26 10:42:25 +02:00
parent 93ab892bdd
commit b7f6bcb3ca
2 changed files with 23 additions and 19 deletions

View File

@@ -16,6 +16,7 @@ var (
version = "unversioned"
date string
configFlag = flag.Bool("config", false, "Print the current default config")
debuggingFlag = flag.Bool("debug", false, "a boolean")
versionFlag = flag.Bool("v", false, "Print the current version")
)
@@ -31,6 +32,10 @@ func main() {
fmt.Printf("commit=%s, build date=%s, version=%s, os=%s, arch=%s\n", commit, date, version, runtime.GOOS, runtime.GOARCH)
os.Exit(0)
}
if *configFlag {
fmt.Printf("%s\n", config.GetDefaultConfig())
os.Exit(0)
}
appConfig, err := config.NewAppConfig("lazygit", version, commit, date, debuggingFlag)
if err != nil {
panic(err)