Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #11234 add terms to no-loc and new cmd example #11235

Merged
merged 2 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions reference/7.4/Microsoft.PowerShell.Core/About/about_Pwsh.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
description: Explains how to use the `pwsh` command-line interface. Displays the command-line parameters and describes the syntax.
Locale: en-US
ms.date: 01/10/2024
no-loc: [-File, -f, -Command, -c, -ConfigurationName, -config, -CustomPipeName, -EncodedCommand, -e, -ec, -ExecutionPolicy, -ex, -ep, -InputFormat, -inp, -if, -Interactive, -i, -Login, -l, -MTA, -NoExit, -noe, -NoLogo, -nol, -NonInteractive, -noni, -NoProfile, -nop, -OutputFormat, -o, -of, -SettingsFile, -settings, -SSHServerMode, -sshs, -STA, -Version, -v, -WindowStyle, -w, -WorkingDirectory, -wd, -Help]
ms.date: 07/05/2024
no-loc: [-File, -f, -Command, -c, -CommandWithArgs, -cwa, -ConfigurationName, -config, -CustomPipeName, -EncodedCommand, -e, -ec, -ExecutionPolicy, -ex, -ep, -InputFormat, -inp, -if, -Interactive, -i, -Login, -l, -MTA, -NoExit, -noe, -NoLogo, -nol, -NonInteractive, -noni, -NoProfile, -nop, -OutputFormat, -o, -of, -SettingsFile, -settings, -SSHServerMode, -sshs, -STA, -Version, -v, -WindowStyle, -w, -WorkingDirectory, -wd, -Help]
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_pwsh?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about Pwsh
Expand Down Expand Up @@ -221,6 +221,20 @@ arg: arg1
arg: arg2
```

> [!NOTE]
> [Argument parsing with quotes][05] causes the example to fail if run from
> `cmd.exe` or `powershell.exe`. To run from those, you can use

```Cmd
REM Quoting required when run from cmd.exe
pwsh -CommandWithArgs "$args | % { ""arg: $_"" }" arg1 arg2
```

```powershell
# Quoting required when run from powershell.exe
pwsh -CommandWithArgs '"$args | % { ""arg: $_"" }"' arg1 arg2
```

### -ConfigurationName | -config

Specifies a configuration endpoint in which PowerShell is run. This can be any
Expand Down Expand Up @@ -410,3 +424,4 @@ prepend the command parameters with a hyphen (`-`), not a forward slash (`/`).
[02]: about_Automatic_Variables.md#lastexitcode
[03]: about_operators.md#special-operators
[04]: https://linux.die.net/man/1/chsh
[05]: about_Parsing.md#passing-arguments-that-contain-quote-characters
19 changes: 17 additions & 2 deletions reference/7.5/Microsoft.PowerShell.Core/About/about_Pwsh.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
description: Explains how to use the `pwsh` command-line interface. Displays the command-line parameters and describes the syntax.
Locale: en-US
ms.date: 01/10/2024
no-loc: [-File, -f, -Command, -c, -ConfigurationName, -config, -CustomPipeName, -EncodedCommand, -e, -ec, -ExecutionPolicy, -ex, -ep, -InputFormat, -inp, -if, -Interactive, -i, -Login, -l, -MTA, -NoExit, -noe, -NoLogo, -nol, -NonInteractive, -noni, -NoProfile, -nop, -OutputFormat, -o, -of, -SettingsFile, -settings, -SSHServerMode, -sshs, -STA, -Version, -v, -WindowStyle, -w, -WorkingDirectory, -wd, -Help]
ms.date: 07/05/2024
no-loc: [-File, -f, -Command, -c, -CommandWithArgs, -cwa, -ConfigurationName, -config, -CustomPipeName, -EncodedCommand, -e, -ec, -ExecutionPolicy, -ex, -ep, -InputFormat, -inp, -if, -Interactive, -i, -Login, -l, -MTA, -NoExit, -noe, -NoLogo, -nol, -NonInteractive, -noni, -NoProfile, -nop, -OutputFormat, -o, -of, -SettingsFile, -settings, -SSHServerMode, -sshs, -STA, -Version, -v, -WindowStyle, -w, -WorkingDirectory, -wd, -Help]
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_pwsh?view=powershell-7.5&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about Pwsh
Expand Down Expand Up @@ -221,6 +221,20 @@ arg: arg1
arg: arg2
```

> [!NOTE]
> [Argument parsing with quotes][05] causes the example to fail if run from
> `cmd.exe` or `powershell.exe`. To run from those, you can use

```Cmd
REM Quoting required when run from cmd.exe
pwsh -CommandWithArgs "$args | % { ""arg: $_"" }" arg1 arg2
```

```powershell
# Quoting required when run from powershell.exe
pwsh -CommandWithArgs '"$args | % { ""arg: $_"" }"' arg1 arg2
```

### -ConfigurationName | -config

Specifies a configuration endpoint in which PowerShell is run. This can be any
Expand Down Expand Up @@ -410,3 +424,4 @@ prepend the command parameters with a hyphen (`-`), not a forward slash (`/`).
[02]: about_Automatic_Variables.md#lastexitcode
[03]: about_operators.md#special-operators
[04]: https://linux.die.net/man/1/chsh
[05]: about_Parsing.md#passing-arguments-that-contain-quote-characters