Skip to content

Commit

Permalink
Refactor autocompletion documentation structure
Browse files Browse the repository at this point in the history
  • Loading branch information
JKamsker committed Sep 24, 2023
1 parent 997f505 commit a911355
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions docs/input/cli/autocompletion.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,21 @@ Spectre.Console.Cli includes auto completion for the shell.
It comes with suggestions for Options and Branches out of the box, but you can also add your own suggestions for option and argument values.

- [Shell integrations](#shell-integrations)
- [PowerShell Integration](#powershell-integration)
- [PowerShell](#powershell)
- [How integrations get the suggestions](#how-integrations-get-the-suggestions)
- [Customizations](#customizations)
- [Static Autocomplete for Arguments and Options](#static-autocomplete-for-arguments-and-options)
- [Dynamic Autocomplete for Arguments and Options](#dynamic-autocomplete-for-arguments-and-options)
- [Disabling the Autocomplete](#disabling-the-autocomplete)
- [Static Autocomplete](#static-autocomplete)
- [Dynamic Autocomplete](#dynamic-autocomplete)
- [Disabling the Module](#disabling-the-module)



## Shell integrations
1. [PowerShell](#powershell-integration)
2. More to come...
1. [PowerShell](#powershell)
3. More to come...


### PowerShell Integration
### PowerShell

You can add autocomplete to PowerShell by running your application with the `completion powershell` command, as shown below:

Expand All @@ -36,7 +37,9 @@ To add autocomplete to PowerShell permanently, use the `--install` flag:
.\AutoCompletion.exe completion powershell --install | Out-String | Invoke-Expression
```

You can test the completion feature by using the `cli complete` command:
## How integrations get the suggestions

The shell integration uses the `cli complete` command to get the suggestions for the current command line like this:

```powershell
.\AutoCompletion.exe cli complete "Li"
Expand Down

0 comments on commit a911355

Please sign in to comment.