Skip to content

Commit 046cdff

Browse files
committed
doc: updated git
1 parent 745fccf commit 046cdff

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/src/freckles/cmd/git.md

+23
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,29 @@ Completion is provided with [`ActionCarapaceBin`].
1818

1919
![](./git/git.cast)
2020

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+
2139
[`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
2242
[Freckles]:https://github.com/carapace-sh/freckles
2343
[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

0 commit comments

Comments
 (0)