From Bojan Gabric to ~rjarry/aerc-devel
Looks really good! Makes it much easier to learn aerc commands. Tested-by: Bojan Gabric <bojan@bojangabric.com>
From Bojan Gabric to ~rjarry/public-inbox
On Sun Sep 29, 2024 at 9:24 PM CEST, Robin Jarry wrote: > Hi Bojan, sorry for the delay. > > I have squashed all four patches into one and updated the code to suit > my OCD :) > > Applied, thanks. > > To git.sr.ht:~rjarry/go-opt > 4bd5fff1499e..476a718a4b47 main -> main Hi Robin, no problem at all, and thank you for merging it! Glad I could contribute.
From Bojan Gabric to ~rjarry/public-inbox
Please disregard this patch. I accidentally removed a line and have sent a v3 patch series.
From Bojan Gabric to ~rjarry/public-inbox
Add test cases to verify that the `description` field is correctly integrated into the autocompletion output. Signed-off-by: Bojan Gabric <bojan@bojangabric.com> --- complete_test.go | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/complete_test.go b/complete_test.go index d2e58f9..3349e9b 100644 --- a/complete_test.go +++ b/complete_test.go @@ -9,11 +9,12 @@ import ( ) [message trimmed]
From Bojan Gabric to ~rjarry/public-inbox
Update test cases to ensure that the expected completions are of type `Completion`. Signed-off-by: Bojan Gabric <bojan@bojangabric.com> --- complete_test.go | 86 +++++++++++++++++++++++++++--------------------- 1 file changed, 49 insertions(+), 37 deletions(-) diff --git a/complete_test.go b/complete_test.go index a210efc..d2e58f9 100644 --- a/complete_test.go +++ b/complete_test.go @@ -47,93 +47,105 @@ func (c *CompleteStruct) CompleteTag(arg string) []string { func TestComplete(t *testing.T) { [message trimmed]
From Bojan Gabric to ~rjarry/public-inbox
Update the autocompletion logic to return `Completion` struct:
type Completion struct {
Value string
Description string
}
This will allow application that uses autocompletion to do what it wants
with the description.
Implements: https://todo.sr.ht/~rjarry/aerc/271
Signed-off-by: Bojan Gabric <bojan@bojangabric.com>
---
Not sure if the function that's passed to the "complete" argument should
[message trimmed]
From Bojan Gabric to ~rjarry/public-inbox
This field will be used to store descriptions that will be displayed during the autocompletion process. Signed-off-by: Bojan Gabric <bojan@bojangabric.com> --- spec.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec.go b/spec.go index d4960d1..1e07042 100644 --- a/spec.go +++ b/spec.go @@ -56,6 +56,8 @@ type optSpec struct { kind optKind [message trimmed]
From Bojan Gabric to ~rjarry/public-inbox
This is a series of patches that introduce a new field `description` that appear alongside arguments during autocompletion. v1->v2: * return Completion struct instead of string to allow applications to use description however they want v2->v3: * accidentally removed `spec = nil` line in v2 Bojan Gabric (4): spec: add description field to arguments complete: include `description` in autocompletion output complete_test: update test cases to return `Completion` type
From Bojan Gabric to ~rjarry/public-inbox
Add test cases to verify that the `description` field is correctly integrated into the autocompletion output. Signed-off-by: Bojan Gabric <bojan@bojangabric.com> --- complete_test.go | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/complete_test.go b/complete_test.go index d2e58f9..3349e9b 100644 --- a/complete_test.go +++ b/complete_test.go @@ -9,11 +9,12 @@ import ( ) [message trimmed]
From Bojan Gabric to ~rjarry/public-inbox
Update test cases to ensure that the expected completions are of type `Completion`. Signed-off-by: Bojan Gabric <bojan@bojangabric.com> --- complete_test.go | 86 +++++++++++++++++++++++++++--------------------- 1 file changed, 49 insertions(+), 37 deletions(-) diff --git a/complete_test.go b/complete_test.go index a210efc..d2e58f9 100644 --- a/complete_test.go +++ b/complete_test.go @@ -47,93 +47,105 @@ func (c *CompleteStruct) CompleteTag(arg string) []string { func TestComplete(t *testing.T) { [message trimmed]