From 3db85febbf02380bc5c38abd660668f1ef53a9c8 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 12 Oct 2025 03:33:53 -0500 Subject: finally a standard place for time.Time() formatting --- sendStrings.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sendStrings.go') diff --git a/sendStrings.go b/sendStrings.go index 19ccc30..2fe1977 100644 --- a/sendStrings.go +++ b/sendStrings.go @@ -1,6 +1,8 @@ package prep -// initializes logging and command line options +// sends the autocomplete strings to the shell +// also where custom strings are pulled in from the application +// calls into go-args for strings parsed by MustParse() import ( "fmt" @@ -21,11 +23,12 @@ func (pb *Auto) Autocomplete2(sendthis string) { pb.SendStrings(strings.Split(sendthis, " ")) } +// the application must send a string "help run list" 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 +// the application must send an array []string{"help", "run", "list"} func (pb *Auto) SendStrings(parts []string) { dur := pb.Duration.AsDuration() if dur < time.Millisecond*200 { -- cgit v1.2.3