Use maps package for generic keys/values functions

This commit is contained in:
Kovid Goyal
2023-03-14 22:42:06 +05:30
parent 7ce83e7fd0
commit 3803d7e3c2
3 changed files with 5 additions and 26 deletions

View File

@@ -8,6 +8,8 @@ import (
"kitty/tools/cli/markup"
"kitty/tools/utils"
"golang.org/x/exp/maps"
)
var _ = fmt.Print
@@ -21,7 +23,7 @@ func fish_completion_script(commands []string) (string, error) {
"kitten": true,
}
if len(commands) == 0 {
commands = append(commands, utils.Keys(all_commands)...)
commands = append(commands, maps.Keys(all_commands)...)
}
script := strings.Builder{}
script.WriteString(`function __ksi_completions