File tree 1 file changed +23
-0
lines changed
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,29 @@ Completion is provided with [`ActionCarapaceBin`].
18
18
19
19
![ ] ( ./git/git.cast )
20
20
21
+ > Without arguments [ ` ActionCarapaceBin ` ] completes all registered commands.
22
+ >
23
+ > Here, we limit it to ` git ` .
24
+ > But it could be even more specific by passing subcommands, flags and arguments.
25
+ >
26
+ > ---
27
+ >
28
+ > Just as above we change the directory with [ Chdir] to the repository.
29
+ >
30
+ > Note that [ Carapace] also supports generic modifications like ` -C <dir> ` with [ PreInvoke] .
31
+ >
32
+ > ---
33
+ >
34
+ > When fully embedding a command ` DisableFlagParsing: true ` is the right aproach.
35
+ >
36
+ > But for [ sudo] -like behaviour where the local command has flags as well there is [ SetInterspersed] .
37
+ > Disabling it stops flag parsing after the first positional argument.
38
+
21
39
[ `ActionCarapaceBin` ] :https://pkg.go.dev/github.com/carapace-sh/carapace-bridge/pkg/actions/bridge#ActionCarapaceBin
40
+ [ Carapace ] :https://carapace.sh
41
+ [ Chdir ] :https://carapace-sh.github.io/carapace/carapace/action/chdir.html
22
42
[ Freckles ] :https://github.com/carapace-sh/freckles
23
43
[ Git ] :https://git-scm.com/
44
+ [ sudo ] :https://github.com/carapace-sh/carapace-bin/blob/master/completers/sudo_completer/cmd/root.go
45
+ [ PreInvoke ] :https://carapace-sh.github.io/carapace/carapace/gen/preInvoke.html
46
+ [ SetInterspersed ] :https://pkg.go.dev/github.com/spf13/pflag#SetInterspersed
You can’t perform that action at this time.
0 commit comments