File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 66 "strings"
77
88 "github.com/carapace-sh/carapace"
9+ "github.com/carapace-sh/carapace-bridge/pkg/actions/bridge"
910 "github.com/carapace-sh/carapace/pkg/style"
1011)
1112
@@ -42,3 +43,21 @@ func ActionFunctions(hidden bool) carapace.Action {
4243 })
4344 }).Tag ("shell functions" )
4445}
46+
47+ // ActionExecutables completes builtins, functions, and commands
48+ func ActionExecutables () carapace.Action {
49+ return carapace .ActionCallback (func (c carapace.Context ) carapace.Action {
50+ switch len (c .Args ) {
51+ case 0 :
52+ return carapace .Batch (
53+ // TODO which order?
54+ ActionBuiltins (),
55+ ActionFunctions (false ),
56+ carapace .ActionExecutables (),
57+ carapace .ActionFiles (),
58+ ).ToA ()
59+ default :
60+ return bridge .ActionCarapaceBin ()
61+ }
62+ })
63+ }
You can’t perform that action at this time.
0 commit comments