Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ZettZet committed Sep 30, 2023
1 parent bd313b4 commit d2a179e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ the `call_silent()` method instead.

### Autocompletion

Cleo supports automatic (tab) completion in `bash`, `zsh` and `fish`.
Cleo supports automatic (tab) completion in `bash`, `zsh`, `fish` and `PowerShell`.

By default, your application will have a `completions` command. To register these completions for your application, run one of the following in a terminal (replacing `[program]` with the command you use to run your application):

Expand All @@ -434,4 +434,7 @@ echo "fpath+=~/.zfunc" >> ~/.zshrc

# Fish
[program] completions fish > ~/.config/fish/completions/[program].fish

# PowerShell
[program] completions PowerShell > $PROFILE
```
7 changes: 7 additions & 0 deletions src/cleo/commands/completions_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,13 @@ class CompletionsCommand(Command):
For the new completions to take affect.
<option=bold>PowerShell</>:
PowerShell profiles are stored at $PROFILE path, so you can simply \
run command like this:
`<options=bold>{script_name} {command_name} PowerShell > $PROFILE</>`
<options=bold>CUSTOM LOCATIONS</>:
Alternatively, you could save these files to the place of your choosing, \
Expand Down

0 comments on commit d2a179e

Please sign in to comment.