chore: remove test completion code

dev
TorchedSammy 2021-12-06 20:52:49 -04:00
parent 6653fa2e03
commit 2ede1a195f
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
2 changed files with 3 additions and 66 deletions

2
go.sum
View File

@ -38,6 +38,8 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k
github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/maxlandon/readline v0.1.0-beta.0.20211027085530-2b76cabb8036 h1:wJMb6UBj7BSW8dquwo7Hyli7SQ2QmjT4L0xKgIyWy08=
github.com/maxlandon/readline v0.1.0-beta.0.20211027085530-2b76cabb8036/go.mod h1:Yzn6jb/68429mQI+aAVOD9yPFnpl2ZYwWien8gBnupo=
github.com/olekukonko/ts v0.0.0-20171002115256-78ecb04241c0 h1:LiZB1h0GIcudcDci2bxbqI6DXV8bF8POAnArqvRrIyw=
github.com/olekukonko/ts v0.0.0-20171002115256-78ecb04241c0/go.mod h1:F/7q8/HZz+TXjlsoZQQKVYvXTZaFH4QRa3y+j1p7MS0=
github.com/pborman/ansi v1.0.0 h1:OqjHMhvlSuCCV5JT07yqPuJPQzQl+WXsiZ14gZsqOrQ=

View File

@ -21,73 +21,8 @@ type lineReader struct {
// other gophers might hate this naming but this is local, shut up
func newLineReader(prompt string) *lineReader {
rl := readline.NewInstance()
rl.TabCompleter = func(line []rune, pos int, dtx readline.DelayedTabContext) (string, []*readline.CompletionGroup) {
var items = []string{
"abaya",
"abomasum",
"absquatulate",
"adscititious",
"afreet",
"Albertopolis",
"alcazar",
"amphibology",
"amphisbaena",
"anfractuous",
"anguilliform",
"apoptosis",
"apple-knocker",
"argle-bargle",
"Argus-eyed",
"argute",
"ariel",
"aristotle",
"aspergillum",
"astrobleme",
"Attic",
"autotomy",
"badmash",
"bandoline",
"bardolatry",
"Barmecide",
"barn",
"bashment",
"bawbee",
"benthos",
"bergschrund",
"bezoar",
"bibliopole",
"bichon",
"bilboes",
"bindlestiff",
"bingle",
"blatherskite",
"bleeding",
"blind",
"bobsy-die",
"boffola",
"boilover",
"borborygmus",
"breatharian",
"Brobdingnagian",
"bruxism",
"bumbo",
}
var suggestions []string
for i := range items {
if strings.HasPrefix(items[i], string(line)) {
suggestions = append(suggestions, items[i][pos:])
}
}
return string(line[pos:]), []*readline.CompletionGroup{
{
Suggestions: suggestions,
},
}
}
rl.Multiline = true
return &lineReader{
rl,
}