readline: Automatically do word completion based on history

This commit is contained in:
Kovid Goyal
2023-03-07 16:44:02 +05:30
parent 4cef83ffd0
commit 0e73c01093
5 changed files with 85 additions and 5 deletions

View File

@@ -7,6 +7,7 @@ import (
"strings"
"kitty/tools/cli"
"kitty/tools/tty"
"kitty/tools/utils"
"kitty/tools/wcswidth"
)
@@ -63,6 +64,8 @@ type completions struct {
current completion
}
var _ = tty.DebugPrintln
func (self *Readline) complete(forwards bool, repeat_count uint) bool {
c := &self.completions
if c.completer == nil {