File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,6 +82,51 @@ sprite use my-project-sprite
8282
8383This creates a ` .sprite ` file that the CLI reads automatically. Add ` .sprite ` to your ` .gitignore ` as it's user-specific.
8484
85+ ## Optional: Install Shell Completions
86+
87+ The CLI provides completion scripts for various shells. Run ` sprite help completion ` for more information.
88+
89+ ### bash
90+
91+ Install the bash completion script by adding it to your ` .bashrc ` :
92+
93+ ``` bash
94+ echo ' eval "$(sprite completion bash)"' >> ~ /.bashrc
95+ ```
96+
97+ ### zsh
98+
99+ If you haven't enabled completions in your ` .zshrc ` yet:
100+
101+ ``` bash
102+ echo " autoload -U compinit; compinit -i" >> ~ /.zshrc
103+ ```
104+
105+ Install the zsh completion script by adding it to your local functions:
106+
107+ ``` bash
108+ sprite completion zsh > ~ /.local/share/zsh/site-functions/_sprite
109+
110+ # If the local functions directory isn't in your fpath
111+ echo " fpath=(\" $HOME /.local/share/zsh/site-functions\" \$ fpath)" >> ~ /.zshrc
112+ ```
113+
114+ ### fish
115+
116+ Install the fish completion script:
117+
118+ ``` bash
119+ sprite completion fish > ~ /.config/fish/completions/sprite.fish
120+ ```
121+
122+ ### PowerShell
123+
124+ Install the PowerShell completion script by appending it to your profile:
125+
126+ ``` powershell
127+ Add-Content $PROFILE "`nsprite completion powershell | Out-String | Invoke-Expression"
128+ ```
129+
85130## Troubleshooting
86131
87132### Permission Denied
You can’t perform that action at this time.
0 commit comments