This commit is contained in:
Kovid Goyal 2023-10-17 15:23:43 +05:30
parent 81b032a161
commit 70a588cb36
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -22,6 +22,7 @@ import (
"kitty"
"kitty/tools/config"
"kitty/tools/tty"
"kitty/tools/utils"
)
@ -221,7 +222,7 @@ func read_relevant_kitty_opts(path string) KittyOpts {
return nil
}
cp := config.ConfigParser{LineHandler: handle_line}
cp.ParseFiles(path)
_ = cp.ParseFiles(path) // ignore errors and use defaults
if ans.Url_prefixes == nil {
ans.Url_prefixes = utils.NewSetWithItems(kitty.KittyConfigDefaults.Url_prefixes...)
}
@ -232,6 +233,9 @@ var RelevantKittyOpts = sync.OnceValue(func() KittyOpts {
return read_relevant_kitty_opts(filepath.Join(utils.ConfigDir(), "kitty.conf"))
})
var debugprintln = tty.DebugPrintln
var _ = debugprintln
func functions_for(opts *Options) (pattern string, post_processors []PostProcessorFunc, group_processors []GroupProcessorFunc) {
switch opts.Type {
case "url":