@@ -46,6 +46,63 @@ npx skills add https://github.com/Demogorgon314/mat-cli --skill mat-cli-heapdump
46462 . Unzip it.
47473 . Run ` ./mat-cli --help ` from the extracted directory.
4848
49+ ### Shell Completion
50+
51+ ` mat-cli ` ships first-party ` bash ` and ` zsh ` completion scripts in the release archive:
52+
53+ - ` completion/bash/mat-cli `
54+ - ` completion/zsh/_mat-cli `
55+
56+ You can also generate the same scripts at runtime:
57+
58+ ``` bash
59+ ./mat-cli completion bash
60+ ./mat-cli completion zsh
61+ ```
62+
63+ Temporary activation in the current shell:
64+
65+ ``` bash
66+ source <( ./mat-cli completion bash)
67+ source <( ./mat-cli completion zsh)
68+ ```
69+
70+ Persistent ` bash ` installation:
71+
72+ ``` bash
73+ mkdir -p ~ /.local/share/bash-completion/completions
74+ cp ./completion/bash/mat-cli ~ /.local/share/bash-completion/completions/mat-cli
75+ ```
76+
77+ Or generate it directly:
78+
79+ ``` bash
80+ mkdir -p ~ /.local/share/bash-completion/completions
81+ ./mat-cli completion bash > ~ /.local/share/bash-completion/completions/mat-cli
82+ ```
83+
84+ Persistent ` zsh ` installation:
85+
86+ ``` bash
87+ mkdir -p ~ /.zfunc
88+ cp ./completion/zsh/_mat-cli ~ /.zfunc/_mat-cli
89+ ```
90+
91+ Or generate it directly:
92+
93+ ``` bash
94+ mkdir -p ~ /.zfunc
95+ ./mat-cli completion zsh > ~ /.zfunc/_mat-cli
96+ ```
97+
98+ If your ` zsh ` setup does not already load ` ~/.zfunc ` , add this once to your shell startup file before ` compinit ` :
99+
100+ ``` zsh
101+ fpath=(~/.zfunc $fpath )
102+ autoload -Uz compinit
103+ compinit
104+ ```
105+
49106## Requirements
50107
51108- Java 17 or newer to run the standalone release
@@ -68,6 +125,7 @@ Useful discovery commands:
68125- ` mat-cli schema <command> --format json `
69126- ` mat-cli list-queries --format json `
70127- ` mat-cli describe-query <query-id> --format json `
128+ - ` mat-cli completion <bash|zsh> `
71129
72130## Example Workflows
73131
0 commit comments