diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-03 14:54:55 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-10 00:23:01 +1100 |
commit | 4912205adb5e8e245b33b8e0d5581bcf0ec37e8a (patch) | |
tree | 90e28657c0af72cd0a880842f88750c01a32834d /pkg/commands/config.go | |
parent | 9440dcf9de3214927125693e512cdc941ca4e123 (diff) |
remove viper
WIP
Diffstat (limited to 'pkg/commands/config.go')
-rw-r--r-- | pkg/commands/config.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/commands/config.go b/pkg/commands/config.go index 018de2724..4e747e32c 100644 --- a/pkg/commands/config.go +++ b/pkg/commands/config.go @@ -24,7 +24,7 @@ func (c *GitCommand) ConfiguredPager() string { } func (c *GitCommand) GetPager(width int) string { - useConfig := c.Config.GetUserConfig().GetBool("git.paging.useConfig") + useConfig := c.Config.GetUserConfig().Git.Paging.UseConfig if useConfig { pager := c.ConfiguredPager() return strings.Split(pager, "| less")[0] @@ -34,12 +34,12 @@ func (c *GitCommand) GetPager(width int) string { "columnWidth": strconv.Itoa(width/2 - 6), } - pagerTemplate := c.Config.GetUserConfig().GetString("git.paging.pager") + pagerTemplate := c.Config.GetUserConfig().Git.Paging.Pager return utils.ResolvePlaceholderString(pagerTemplate, templateValues) } func (c *GitCommand) colorArg() string { - return c.Config.GetUserConfig().GetString("git.paging.colorArg") + return c.Config.GetUserConfig().Git.Paging.ColorArg } func (c *GitCommand) GetConfigValue(key string) string { |