Skip to content

Commit 3800ff7

Browse files
Fix incorrect case/capitalization in reference documents (28/38) (#11936)
* Fix incorrect case/capitalization in ref docs This ensures the following components have the correct/consistent case throughout the reference documentation: Preference variable, PS environment variable, PS drive, PS provider, PS command name, PS command argument, PS module, PS file extension, PS host name/application, #Requires statement, parameter name, about_* topic, member name, scope modifier, keyword, operator, calculated property key/value, attribute, type accelerator, type literal/name, WMI namespace/class, variable name, special character, comment-based help keyword, product/company name, Windows drive letter/directory, Windows/Unix environment variable In addition, changes include fixes to incorrect terminology (e.g., referring to a keyword as a command) and formatting of PS syntax elements (non-exhaustive). * Format PowerShell example for readability Reformat code --------- Co-authored-by: Sean Wheeler <[email protected]>
1 parent 39aa8c6 commit 3800ff7

40 files changed

+125
-119
lines changed

reference/5.1/Microsoft.PowerShell.Security/Get-AuthenticodeSignature.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ command line. In this example, the name of the **FilePath** parameter, which is
6565
### Example 3: Get only valid Authenticode signatures for multiple files
6666

6767
```powershell
68-
Get-ChildItem $PSHOME\*.* | ForEach-object {Get-AuthenticodeSignature $_} | Where-Object {$_.status -eq "Valid"}
68+
Get-ChildItem $PSHOME\*.* |
69+
ForEach-Object {Get-AuthenticodeSignature $_} |
70+
Where-Object {$_.Status -eq "Valid"}
6971
```
7072

7173
This command lists all of the files in the `$PSHOME` directory that have a valid Authenticode

reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ $Header = 'State', 'MoreData', 'StatusMessage', 'Location', 'Command',
8989
'BeginTime', 'EndTime', 'JobType', 'Output', 'Error', 'Progress',
9090
'Verbose', 'Debug', 'Warning', 'Information'
9191
# Delete the default header from $J
92-
$J = $J[1..($J.count - 1)]
92+
$J = $J[1..($J.Count - 1)]
9393
$J | ConvertFrom-Csv -Header $Header
9494
```
9595

reference/5.1/PSReadLine/About/about_PSReadLine.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ APIs are documented in [about_PSReadLine_Functions][02].
126126
PSReadLine maintains a history file containing all the commands and data you've
127127
entered from the command line. The history files are a file named
128128
`$($Host.Name)_history.txt`. On Windows systems the history file is stored at
129-
`$env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine`.
129+
`$Env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine`.
130130

131131
The history can contain sensitive data including passwords. PSReadLine attempts
132132
to filter out sensitive information. Any command lines containing the following
@@ -213,7 +213,7 @@ kubectl get secrets
213213
kubectl get secret db-user-pass -o jsonpath='{.data.password}' | base64 --decode
214214
kubectl describe secret db-user-pass
215215
az account get-access-token --resource=https://app.contoso.com --query accessToken --output tsv
216-
$env:PGPASS = gcloud auth print-access-token
216+
$Env:PGPASS = gcloud auth print-access-token
217217
```
218218

219219
### Feedback & contributing to PSReadLine

reference/5.1/PSReadLine/About/about_PSReadLine_Functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,8 +1064,8 @@ chords.
10641064

10651065
### ViEditVisually
10661066

1067-
Edit the command line in a text editor specified by `$env:EDITOR` or
1068-
`$env:VISUAL`.
1067+
Edit the command line in a text editor specified by `$Env:EDITOR` or
1068+
`$Env:VISUAL`.
10691069

10701070
- Emacs mode: `<Ctrl+x,Ctrl+e>`
10711071
- Vi command mode: `<v>`

reference/5.1/PSReadLine/About/about_PSReadLine_Release_Notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ release:
183183
- Supporting line-wise yanks, including paste and undo
184184
- Make `y0` yank up to the start of the logical line in `VI` mode
185185
- Add API to detect if the screen reader is active
186-
- Make `PageUp/PageDown` and `CtrlPageUp/CtrlPageDown` windows only
186+
- Make `PageUp/PageDown` and `CtrlPageUp/CtrlPageDown` Windows-only
187187
- Add script block vi mode indicator option
188188
- Support vi mode `G` and `gg` movements in multi-line buffers
189189
- Supports `_` and `$` to move to the beginning and end of the logical line in

reference/5.1/PSReadLine/Set-PSReadLineOption.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ This example emits a cursor change VT escape in response to a **Vi** mode change
130130
function OnViModeChange {
131131
if ($args[0] -eq 'Command') {
132132
# Set the cursor to a blinking block.
133-
Write-Host -NoNewLine "$([char]0x1b)[1 q"
133+
Write-Host -NoNewline "$([char]0x1b)[1 q"
134134
} else {
135135
# Set the cursor to a blinking line.
136-
Write-Host -NoNewLine "$([char]0x1b)[5 q"
136+
Write-Host -NoNewline "$([char]0x1b)[5 q"
137137
}
138138
}
139139
Set-PSReadLineOption -ViModeIndicator Script -ViModeChangeHandler $Function:OnViModeChange
@@ -153,9 +153,9 @@ to history.
153153

154154
```powershell
155155
$ScriptBlock = {
156-
Param([string]$line)
156+
param ([string]$Line)
157157
158-
if ($line -match "^git") {
158+
if ($Line -match "^git") {
159159
return $false
160160
} else {
161161
return $true
@@ -520,7 +520,7 @@ platforms store the file in different locations. The filename is stored in a var
520520

521521
If you don't use this parameter, the default path is:
522522

523-
`$env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\$($Host.Name)_history.txt`
523+
`$Env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine\$($Host.Name)_history.txt`
524524

525525
```yaml
526526
Type: System.String
@@ -529,7 +529,7 @@ Aliases:
529529
530530
Required: False
531531
Position: Named
532-
Default value: A file named $($Host.Name)_history.txt in $env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine on Windows and $env:XDG_DATA_HOME/powershell/PSReadLine or $HOME/.local/share/powershell/PSReadLine on non-Windows platforms
532+
Default value: A file named $($Host.Name)_history.txt in $Env:APPDATA\Microsoft\Windows\PowerShell\PSReadLine on Windows and $Env:XDG_DATA_HOME/powershell/PSReadLine or $HOME/.local/share/powershell/PSReadLine on non-Windows platforms
533533
Accept pipeline input: False
534534
Accept wildcard characters: False
535535
```

reference/7.4/Microsoft.PowerShell.Core/About/about_Built-in_Functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ the system's pager command. PowerShell uses a different default pager for
5353
Windows and non-Windows systems. On Windows systems, the default pager is
5454
`more.com`. On non-Windows systems, the default pager is `less`.
5555

56-
If the `$env:PAGER` environment variable is defined, PowerShell uses the
56+
If the `$Env:PAGER` environment variable is defined, PowerShell uses the
5757
specified program instead of the system default.
5858

5959
## `prompt`

reference/7.4/Microsoft.PowerShell.Core/About/about_Calling_Generic_Methods.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ overloads, or when the generic method takes no formal parameter. PowerShell can
2222
fail to resolve the correct method without the explicit generic method
2323
arguments.
2424

25-
For example, `[Array]::Empty<T>()`. The .NET **Array** class has a static,
25+
For example, `[array]::Empty<T>()`. The .NET **Array** class has a static,
2626
generic method `Empty<T>()` that takes no formal parameters.
2727

2828
Prior to PowerShell 7.3, to ensure proper method resolution you had to use
@@ -72,8 +72,8 @@ require two generic type parameters and two formal value parameters.
7272
$result = [System.Linq.Enumerable]::Select[int, float](
7373
$list,
7474
[Func[int, float]]{
75-
param($item)
76-
[math]::Pow($item, 3)
75+
param($Item)
76+
[Math]::Pow($Item, 3)
7777
}
7878
)
7979
$result

reference/7.4/Microsoft.PowerShell.Core/About/about_Logging_Windows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ private key:
203203

204204
```powershell
205205
Get-WinEvent Microsoft-Windows-PowerShell/Operational |
206-
Where-Object Id -eq 4104 | Unprotect-CmsMessage
206+
Where-Object Id -EQ 4104 | Unprotect-CmsMessage
207207
```
208208

209209
## See also

reference/7.4/Microsoft.PowerShell.Core/About/about_PowerShell_Config.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ Example:
418418
"Transcription": {
419419
"EnableTranscripting": true,
420420
"EnableInvocationHeader": true,
421-
"OutputDirectory": "c:\\tmp"
421+
"OutputDirectory": "C:\\tmp"
422422
}
423423
}
424424
```
@@ -436,7 +436,7 @@ Example:
436436
```json
437437
{
438438
"UpdatableHelp": {
439-
"DefaultSourcePath": "f:\\temp"
439+
"DefaultSourcePath": "F:\\temp"
440440
}
441441
}
442442
```

0 commit comments

Comments
 (0)