-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(AB#200851) Update for
alpha.4
release
This change brings over the updates to the reference documentation and the changelog from the `alpha.4` release of DSCv3. It also updates the TOC to enable navigating to every reference document. - Fixes AB#200851
- Loading branch information
1 parent
237a0ef
commit 4c74c72
Showing
39 changed files
with
1,226 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
dsc/docs-conceptual/dsc-3.0/reference/cli/completer/command.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
--- | ||
description: Command line reference for the 'dsc completer' command | ||
ms.date: 01/17/2024 | ||
ms.topic: reference | ||
title: dsc completer | ||
--- | ||
|
||
# dsc completer | ||
|
||
## Synopsis | ||
|
||
Generates a shell completion script. | ||
|
||
## Syntax | ||
|
||
```sh | ||
dsc completer [Options] <SHELL> | ||
``` | ||
|
||
## Description | ||
|
||
The `completer` command returns a shell script that, when executed, registers completions for the | ||
given shell. DSC can generate completion scripts for the following shells: | ||
|
||
- [Bourne Again SHell (BASH)][01] | ||
- [Elvish][02] | ||
- [Friendly Interactive SHell (fish)][03] | ||
- [PowerShell][04] | ||
- [Z SHell (ZSH)][05] | ||
|
||
The output for this command is the script itself. To register completions for DSC, execute the | ||
script. | ||
|
||
> [!WARNING] | ||
> Always review scripts before executing them, especially in an elevated execution context. | ||
## Examples | ||
|
||
### Example 1 - Register completions for Bash | ||
|
||
```sh | ||
completer=~/dsc_completion.bash | ||
# Export the completion script | ||
dsc completer bash > $completer | ||
# Review the completion script | ||
cat $completer | ||
# Add the completion script to your profile | ||
echo "source $completer" >> ~/.bashrc | ||
# Execute the completion script to register completions for this session | ||
source $completer | ||
``` | ||
|
||
### Example 2 - Register completions for PowerShell | ||
|
||
```powershell | ||
$Completer = '~/dsc_completion.ps1' | ||
# Export the completion script | ||
dsc completer powershell | Out-File $Completer | ||
# Review the completion script | ||
Get-Content $completer | ||
# Add the completion script to your profile | ||
Add-Content -Path $PROFILE ". $Completer" | ||
# Execute the completion script to register completions for this session | ||
. $Completer | ||
``` | ||
|
||
## Arguments | ||
|
||
### SHELL | ||
|
||
This argument is mandatory for the `completer` command. The value for this option determines which | ||
shell the application returns a completion script for: | ||
|
||
- `bash` - [Bourne Again SHell (BASH)][01] | ||
- `elvish` - [Elvish][02] | ||
- `fish` - [Friendly Interactive SHell (fish)][03] | ||
- `powershell` - [PowerShell][04] | ||
- `zsh` - [Z SHell (ZSH)][05] | ||
|
||
```yaml | ||
Type: String | ||
Mandatory: true | ||
ValidValues: [ | ||
bash, | ||
elvish, | ||
fish, | ||
powershell, | ||
zsh, | ||
] | ||
``` | ||
## Options | ||
### -h, --help | ||
Displays the help for the current command or subcommand. When you specify this option, the | ||
application ignores all options and arguments after this one. | ||
```yaml | ||
Type: Boolean | ||
Mandatory: false | ||
``` | ||
[01]: https://www.gnu.org/software/bash/ | ||
[02]: https://elv.sh/ | ||
[03]: https://fishshell.com/ | ||
[04]: https://learn.microsoft.com/powershell/scripting/overview | ||
[05]: https://zsh.sourceforge.io/ |
Oops, something went wrong.