diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 8fee360..56475b3 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -14,7 +14,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.20' + go-version: '1.22' - name: Replace dependency run: | @@ -43,7 +43,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.20' + go-version: '1.22' - name: Build run: go build -v ./... diff --git a/core.go b/core.go index 1f69e7b..321a259 100644 --- a/core.go +++ b/core.go @@ -17,7 +17,7 @@ func init() { addCoreMacro("directories", MacroN(carapace.ActionDirectories)) addCoreMacro("files", MacroV(carapace.ActionFiles)) - addCoreMacro("executables", MacroN(carapace.ActionExecutables)) + addCoreMacro("executables", MacroV(carapace.ActionExecutables)) addCoreMacro("message", MacroI(func(s string) carapace.Action { return carapace.ActionMessage(s) })) // TODO is there still use for this? addCoreMacro("noflag", MacroN(func() carapace.Action { return carapace.ActionValues() }).NoFlag()) addCoreMacro("spec", MacroI(ActionSpec)) diff --git a/docs/src/carapace-spec/macros/core.md b/docs/src/carapace-spec/macros/core.md index 8958d83..33890d9 100644 --- a/docs/src/carapace-spec/macros/core.md +++ b/docs/src/carapace-spec/macros/core.md @@ -19,10 +19,9 @@ Core macros provided by [carapace-spec](https://github.com/carapace-sh/carapace- ## executables -[`$executables`](https://carapace-sh.githbub.io/carapace/carapace/defaultActions/actionExecutables.html) completes [PATH] executables. - +[`$executables`](https://carapace-sh.githbub.io/carapace/carapace/defaultActions/actionExecutables.html) completes executables either from [PATH] or given directories. ```yaml -["$executables"] +["$executables", "$executables([~/.local/bin])"] ``` ## files diff --git a/go.mod b/go.mod index ba8fc55..bd789f3 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,9 @@ module github.com/carapace-sh/carapace-spec -go 1.18 +go 1.22 require ( - github.com/carapace-sh/carapace v1.1.3 + github.com/carapace-sh/carapace v1.1.6 github.com/invopop/jsonschema v0.12.0 github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 diff --git a/go.sum b/go.sum index ec28e14..ca21ffa 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPn github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/carapace-sh/carapace v1.1.3 h1:EpkXrD7+I8TpvdnwGCrPnaDTS24dO514dyUiG+8QCj4= -github.com/carapace-sh/carapace v1.1.3/go.mod h1:djegtVDi/3duSAqZNU+/nCq7XtDRMRZUb5bW0O/HnEs= +github.com/carapace-sh/carapace v1.1.6 h1:1aQlqtyg/HzzwFdDi0HzbfFjaPy/YIfN0TllJPSkYZ0= +github.com/carapace-sh/carapace v1.1.6/go.mod h1:djegtVDi/3duSAqZNU+/nCq7XtDRMRZUb5bW0O/HnEs= github.com/carapace-sh/carapace-shlex v1.0.1 h1:ww0JCgWpOVuqWG7k3724pJ18Lq8gh5pHQs9j3ojUs1c= github.com/carapace-sh/carapace-shlex v1.0.1/go.mod h1:lJ4ZsdxytE0wHJ8Ta9S7Qq0XpjgjU0mdfCqiI2FHx7M= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=