mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 02:02:14 +02:00
...
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
|||||||
|
|
||||||
"kitty"
|
"kitty"
|
||||||
"kitty/tools/config"
|
"kitty/tools/config"
|
||||||
|
"kitty/tools/tty"
|
||||||
"kitty/tools/utils"
|
"kitty/tools/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -221,7 +222,7 @@ func read_relevant_kitty_opts(path string) KittyOpts {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
cp := config.ConfigParser{LineHandler: handle_line}
|
cp := config.ConfigParser{LineHandler: handle_line}
|
||||||
cp.ParseFiles(path)
|
_ = cp.ParseFiles(path) // ignore errors and use defaults
|
||||||
if ans.Url_prefixes == nil {
|
if ans.Url_prefixes == nil {
|
||||||
ans.Url_prefixes = utils.NewSetWithItems(kitty.KittyConfigDefaults.Url_prefixes...)
|
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"))
|
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) {
|
func functions_for(opts *Options) (pattern string, post_processors []PostProcessorFunc, group_processors []GroupProcessorFunc) {
|
||||||
switch opts.Type {
|
switch opts.Type {
|
||||||
case "url":
|
case "url":
|
||||||
|
|||||||
Reference in New Issue
Block a user