Commit dfaeb3e
committed
Add shell completion for bash, zsh, and fish
Introduces a `ggt completion` command that emits accurate completion
scripts covering commands, subcommands, flags, and dynamic value
providers (app names, environments, log levels, editors). A hidden
`--__complete` root flag routes live completion requests through a
handler/provider layer. Generators suppress filename fallback in all
three shells.
Refactors the args layer in preparation: long flag names become
canonical with short forms as aliases, completion functions are inlined
into flag definitions, and MergeConflictPreferenceValues is exported for
direct reference. AppIdentityArgs is moved to app-identity.ts and
SyncJsonArgs is inlined into sync-json.ts to break ESM init cycles that
caused flag stripping in CI.
Test coverage includes shell syntax validation against real binaries,
behavioral regression tests, and snapshot tests for all three
generators. Deterministic shell versions are pinned in the nix dev shell
so CI runs against stable binaries.1 parent 26f04ca commit dfaeb3e
File tree
45 files changed
+4303
-256
lines changed- .changeset
- .claude/rules
- .cspell
- nix
- spec
- __support__
- commands
- __snapshots__
- services
- app
- __snapshots__
- command
- __snapshots__
- filesync
- src
- commands
- services
- app
- command
- completion
- filesync
- output/log
- util
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
45 files changed
+4303
-256
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
5 | 11 | | |
6 | 12 | | |
7 | 13 | | |
| |||
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
| 23 | + | |
17 | 24 | | |
18 | 25 | | |
19 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
0 commit comments