mirror of
https://github.com/go-delve/delve.git
synced 2025-10-27 20:23:41 +08:00
pkg/terminal: Allow fuzzy searching tab completions (#2633)
This patch implements fuzzy searching for tab completions in the terminal client. Under the hood it is using a trie data structure (https://en.wikipedia.org/wiki/Trie) to perform very fast prefix / fuzzy searches.
This commit is contained in:
@ -178,7 +178,7 @@ func withTestTerminalBuildFlags(name string, t testing.TB, buildFlags test.Build
|
||||
func TestCommandDefault(t *testing.T) {
|
||||
var (
|
||||
cmds = Commands{}
|
||||
cmd = cmds.Find("non-existant-command", noPrefix)
|
||||
cmd = cmds.Find("non-existant-command", noPrefix).cmdFn
|
||||
)
|
||||
|
||||
err := cmd(nil, callContext{}, "")
|
||||
@ -194,7 +194,7 @@ func TestCommandDefault(t *testing.T) {
|
||||
func TestCommandReplayWithoutPreviousCommand(t *testing.T) {
|
||||
var (
|
||||
cmds = DebugCommands(nil)
|
||||
cmd = cmds.Find("", noPrefix)
|
||||
cmd = cmds.Find("", noPrefix).cmdFn
|
||||
err = cmd(nil, callContext{}, "")
|
||||
)
|
||||
|
||||
@ -206,7 +206,7 @@ func TestCommandReplayWithoutPreviousCommand(t *testing.T) {
|
||||
func TestCommandThread(t *testing.T) {
|
||||
var (
|
||||
cmds = DebugCommands(nil)
|
||||
cmd = cmds.Find("thread", noPrefix)
|
||||
cmd = cmds.Find("thread", noPrefix).cmdFn
|
||||
)
|
||||
|
||||
err := cmd(nil, callContext{}, "")
|
||||
|
||||
Reference in New Issue
Block a user