Skip to content

doc: Add note about using ; as a separator in PowerShell#5361

Merged
DHowett-MSFT merged 6 commits intomasterfrom
dev/migrie/docs/4570-commandline-separator-notes
Apr 21, 2020
Merged

doc: Add note about using ; as a separator in PowerShell#5361
DHowett-MSFT merged 6 commits intomasterfrom
dev/migrie/docs/4570-commandline-separator-notes

Conversation

@zadjii-msft
Copy link
Member

This PR adds some notes from #4570 to the UsingCommandlineArguments.md doc. Hopefully, this should add clarity on how to use sub-commands in the wt commandline from within Powershell.

@zadjii-msft zadjii-msft added Issue-Docs It's a documentation issue that really should be on MicrosoftDocs/Console-Docs Area-Commandline wt.exe's commandline arguments labels Apr 15, 2020
Co-Authored-By: Dustin L. Howett (MSFT) <duhowett@microsoft.com>

#### Single quoted parameters (if you aren't calculating anything):
In this example, we'll wrap all the parameters to `wt` in single quotes (`'`),
and run `wt` with the `Start-Process` command:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: add a sentence about what start-process does.


#### Not using `start`

The astute reader will note that all the above examples used `start` to launch the Terminal.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eh. We could probably do without this statement.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a counterpoint? I saw start and wondered "wtf is he using start for over and over"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. By "statement" I mean this specific sentence, not section. Feels a bit weird to call the reader "astute" haha.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, i mean, i specifically noticed that start was in use, and I wanted to know why. I think this sentence is valuable because it makes people feel seen ;P

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Um.... It's probably worth noting that start avoids the waiting problem described below.

```

```Powershell
wt --% new-tab cmd ; split-pane -p "Windows PowerShell" ; split-pane -H wsl.exe
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't you be able to mix this with start and do something like start --% wt ...? Then you get the best of both worlds.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

start-process doesn't quite work like that

Co-Authored-By: Josh Soref <jsoref@users.noreply.github.com>
@DHowett-MSFT
Copy link
Contributor

@carlos-zamora your concerns have been addressed?

@DHowett-MSFT DHowett-MSFT changed the title Add notes about using ; as a separator for wt commands in Powershell doc: Add note about using ; as a separator in PowerShell Apr 21, 2020
@DHowett-MSFT DHowett-MSFT merged commit f6f0731 into master Apr 21, 2020
@DHowett-MSFT DHowett-MSFT deleted the dev/migrie/docs/4570-commandline-separator-notes branch April 21, 2020 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Commandline wt.exe's commandline arguments Issue-Docs It's a documentation issue that really should be on MicrosoftDocs/Console-Docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation: terminal uses ; for separating subcommands

4 participants