diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/bind_config.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/util/bind_config.go b/util/bind_config.go index 2ab6cc9..ece5c2e 100644 --- a/util/bind_config.go +++ b/util/bind_config.go @@ -33,6 +33,7 @@ type SearchConfig struct { PromptLength int SearchLength int SearchOffset int + AutoSel int SearchNSFW bool } @@ -49,6 +50,13 @@ func BindSearchConfig(flags *pflag.FlagSet) (SearchConfig, error) { err error ) + if flags.Lookup("auto-select").Changed { + conf.AutoSel, err = flags.GetInt("auto-select") + if err != nil {return conf, err} + } else { + conf.AutoSel = viper.GetInt("searching.auto_select_n") + } + if flags.Lookup("prompt-length").Changed { conf.PromptLength, err = flags.GetInt("prompt-length") if err != nil {return conf, err} |