INNER CODE UNIT · Go

getLastSymbol

asciimoo/wuzz · wuzz.go:406

func getLastSymbol(str string) string {
	return symbolPattern.FindString(str)
}

func completeFromSlice(str string, completions []string) []string {
	completed := []string{}
	if str == "" || strings.TrimRight(str, " \n") != str {
		return completed
	}
	for _, completion := range completions {
		if strings.HasPrefix(completion, str) && str != completion {
			completed = append(completed, completion)
		}
	}
	return completed
}

func (e *AutocompleteEditor) Edit(v *gocui.View, key gocui.Key, ch rune, mod gocui.Modifier) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…