Browse Source

Merge pull request #4 from haukened/dev

added support for @ mentions
pull/5/head
Gregory Rudolph 5 years ago committed by GitHub
parent
commit
218c9812c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      main.go

4
main.go

@ -292,6 +292,10 @@ func handleTab() error { @@ -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)

Loading…
Cancel
Save