summaryrefslogtreecommitdiffstats
path: root/cmd/root.go
diff options
context:
space:
mode:
authorAlex Goodman <wagoodman@gmail.com>2018-11-05 22:37:25 -0500
committerAlex Goodman <wagoodman@gmail.com>2018-11-05 22:37:25 -0500
commit41e1685efebc402f1dff56678ae368d12a804809 (patch)
tree0074f2351cf8c9fa4c916e5b086cbcdc951d5c89 /cmd/root.go
parenta95c45e8c9203bcd3ba024b08d7abcbd1cc61061 (diff)
drive view options from configuration (closes #56)
Diffstat (limited to 'cmd/root.go')
-rw-r--r--cmd/root.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/cmd/root.go b/cmd/root.go
index a53eebf..1447951 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -80,14 +80,14 @@ func initConfig() {
viper.SetDefault("log.level", log.InfoLevel.String())
viper.SetDefault("log.path", "./dive.log")
viper.SetDefault("log.enabled", true)
- // status view / global
+ // keybindings: status view / global
viper.SetDefault("keybinding.quit", "ctrl+c")
viper.SetDefault("keybinding.toggle-view", "tab, ctrl+space")
viper.SetDefault("keybinding.filter-files", "ctrl+f, ctrl+slash")
- // layer view
+ // keybindings: layer view
viper.SetDefault("keybinding.compare-all", "ctrl+a")
viper.SetDefault("keybinding.compare-layer", "ctrl+l")
- // filetree view
+ // keybindings: filetree view
viper.SetDefault("keybinding.toggle-collapse-dir", "space")
viper.SetDefault("keybinding.toggle-added-files", "ctrl+a")
viper.SetDefault("keybinding.toggle-removed-files", "ctrl+r")
@@ -96,6 +96,9 @@ func initConfig() {
viper.SetDefault("keybinding.page-up", "pgup")
viper.SetDefault("keybinding.page-down", "pgdn")
+ viper.SetDefault("diff.hide", "")
+ viper.SetDefault("layer.show-aggregated-changes", false)
+
viper.AutomaticEnv() // read in environment variables that match
// If a config file is found, read it in.