description | ms.date | ms.topic | title |
---|---|---|---|
Command line reference for the 'dsc completer' command |
01/17/2024 |
reference |
dsc completer |
Generates a shell completion script.
dsc completer [Options] <SHELL>
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:
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.
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
$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
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)elvish
- Elvishfish
- Friendly Interactive SHell (fish)powershell
- PowerShellzsh
- Z SHell (ZSH)
Type: String
Mandatory: true
ValidValues: [
bash,
elvish,
fish,
powershell,
zsh,
]
Displays the help for the current command or subcommand. When you specify this option, the application ignores all options and arguments after this one.
Type: Boolean
Mandatory: false