1
0
mirror of https://github.com/Rudi9719/kbtui.git synced 2026-03-22 07:37:23 +00:00

Merge pull request #4 from haukened/dev

added support for @ mentions
This commit is contained in:
2019-10-11 10:17:36 -04:00
committed by GitHub

View File

@ -292,6 +292,10 @@ func handleTab() error {
// if you successfully get an input string, grab the last word from the string
ss := strings.Split(inputString, " ")
s := ss[len(ss)-1]
// now in case the word (s) is a mention @something, lets remove it to normalize
if strings.HasPrefix(s, "@") {
s = strings.Replace(s, "@", "", 1)
}
// now call get the list of all possible cantidates that have that as a prefix
resultSlice := generateTabCompletionSlice(s)
lcp := longestCommonPrefix(resultSlice)