Replace use of sync.Once

This commit is contained in:
Kovid Goyal
2023-02-22 08:17:20 +05:30
parent fa0773d9d2
commit 587d06b295
2 changed files with 15 additions and 41 deletions

View File

@@ -66,8 +66,8 @@ func complete_plus_open(completions *cli.Completions, word string, arg_num int)
}
func complete_themes(completions *cli.Completions, word string, arg_num int) {
kitty, err := utils.KittyExe()
if err == nil {
kitty := utils.KittyExe()
if kitty != "" {
out, err := exec.Command(kitty, "+runpy", "from kittens.themes.collection import *; print_theme_names()").Output()
if err == nil {
mg := completions.AddMatchGroup("Themes")