diff options
Diffstat (limited to 'auto.Complete.go')
| -rw-r--r-- | auto.Complete.go | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/auto.Complete.go b/auto.Complete.go index f53d282..19ccc30 100644 --- a/auto.Complete.go +++ b/auto.Complete.go @@ -11,17 +11,22 @@ import ( "go.wit.com/log" ) -// this is the user's application sending us strings we need to send to bash -func (pb *Auto) SendStrings(sendthis []string) { - pb.Autocomplete2(strings.Join(sendthis, " ")) -} - -// todo: move everything to this? +// deprecate func (pb *Auto) Autocomplete3(sendthis []string) { - pb.Autocomplete2(strings.Join(sendthis, " ")) + pb.SendStrings(sendthis) } +// deprecate func (pb *Auto) Autocomplete2(sendthis string) { + pb.SendStrings(strings.Split(sendthis, " ")) +} + +func (pb *Auto) SendString(sendthis string) { + pb.SendStrings(strings.Split(sendthis, " ")) +} + +// this is the user's application sending us strings we need to send to bash +func (pb *Auto) SendStrings(parts []string) { dur := pb.Duration.AsDuration() if dur < time.Millisecond*200 { pb.Debug = true @@ -42,7 +47,7 @@ func (pb *Auto) Autocomplete2(sendthis string) { } } - parts := strings.Split(sendthis, " ") + // parts := strings.Split(sendthis, " ") var all []string for _, part := range parts { var found bool |
