mirror of
https://github.com/wagoodman/dive
synced 2026-03-14 22:35:50 +01:00
configurable directory collapse default value (closes #70)
This commit is contained in:
parent
e153cb4f4a
commit
64d1a3bcc3
2 changed files with 3 additions and 1 deletions
|
|
@ -98,6 +98,7 @@ func initConfig() {
|
|||
|
||||
viper.SetDefault("diff.hide", "")
|
||||
viper.SetDefault("layer.show-aggregated-changes", false)
|
||||
viper.SetDefault("filetree.collapse-dir", false)
|
||||
|
||||
viper.AutomaticEnv() // read in environment variables that match
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import (
|
|||
"crypto/md5"
|
||||
"fmt"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/viper"
|
||||
"io"
|
||||
)
|
||||
|
||||
|
|
@ -61,7 +62,7 @@ func (data *NodeData) Copy() *NodeData {
|
|||
// NewViewInfo creates a default ViewInfo
|
||||
func NewViewInfo() (view *ViewInfo) {
|
||||
return &ViewInfo{
|
||||
Collapsed: false,
|
||||
Collapsed: viper.GetBool("filetree.collapse-dir"),
|
||||
Hidden: false,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue