forked from PowerShell/DSC
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(DOCS) Update changelog, documentation, & schemas
This change updates the project changelog, reference documentation, and schemas for the recent PRs merged for the project: - PowerShell#206 - PowerShell#208 - PowerShell#211 - PowerShell#213 - PowerShell#215 - PowerShell#216 - PowerShell#217 The updates include: - Documenting the new `_exist` property, replacing `_ensure` for resources. This documentation update includes the schema definition, but doesn't regenerate the schema, which will be handled separately. - Documenting the new `completer` command. - Documenting the new `--input` and `--input-file` global options. - Adding a deprecation notice to the `_ensure` documentation. - Adding entries for all user-impacting changes to the changelog.
- Loading branch information
1 parent
67ade07
commit ed044c6
Showing
11 changed files
with
437 additions
and
50 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
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: 10/05/2023 | ||
ms.topic: reference | ||
title: dsc schema | ||
--- | ||
|
||
# dsc schema | ||
|
||
## 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/ |
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
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
Oops, something went wrong.