Replace use of sync.Once

This commit is contained in:
Kovid Goyal 2023-02-22 08:17:20 +05:30
parent fa0773d9d2
commit 587d06b295
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
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")