Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Specs are JSON files based on the [Fig completion spec schema](https://fig.io/do
| Location | Description |
|----------|-------------|
| `command-signatures/json/*.json` | Hand-written specs |
| `command-signatures/json/aws/*.json` and `json/gcloud/*.json` | Nested `loadSpec` targets imported for slash-path lookup |
| `command-signatures/json/autogenerated/powershell/*.json` | Auto-generated PowerShell cmdlet specs |
| `command-signatures/json/overrides/powershell/*.json` | Hand-written overrides for autogenerated specs |

Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,21 @@
The command signatures, a.k.a. "specs", are stored in the `./command-signatures/json`.
All the specs in `./command-signatures/json/*.json` are hand-written.
Those which are generated programmatically are in `./command-signatures/json/autogenerated/**/*.json`.
Currently, we only autogenerate specs for PowerShell cmdlets.
You can trigger this process with:
Currently, we autogenerate PowerShell cmdlet specs and import nested `aws`/`gcloud` `loadSpec` targets.
Refresh PowerShell specs with:

```sh
cargo run --bin autogenerate_powershell
```

This must be rerun any time we change our autogeneration logic or Microsoft updates PowerShell's cmdlets.

Nested `loadSpec` targets live in `./command-signatures/json/aws/*.json` and `./command-signatures/json/gcloud/*.json`. Refresh them from a pinned upstream autocomplete checkout with:

```sh
script/import_load_spec_targets /path/to/upstream/autocomplete
```

When making changes to this script, put the git hunks for the autogenerated specs into a separate commit to make PR review easier.

### Overriding Autogenerated Commands
Expand Down
2 changes: 1 addition & 1 deletion command-signatures/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ lazy_static = "1.4.0"
log = "0.4"
rayon = { version = "1.5.3", optional = true }
regex = "1.5.4"
rust-embed = { version = "6.4.2", features = ["debug-embed", "include-exclude"], optional = true }
rust-embed = { version = "6.4.2", features = ["debug-embed", "include-exclude", "compression"], optional = true }
serde = {version = "1.0", features = ["derive"]}
serde_json = "1.0"
serde_with = "^3.21"
Expand Down
Loading
Loading