From 92992e7c7a06deec0fe04af952bc19cc7a84331e Mon Sep 17 00:00:00 2001 From: David Haukeness Date: Thu, 10 Oct 2019 13:20:57 -0600 Subject: [PATCH] added support for @ mentions --- main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.go b/main.go index ce1340f..164ed9b 100644 --- a/main.go +++ b/main.go @@ -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)