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

docs: clarify usage cli options -e,-p on windows #15568

Closed
wants to merge 3 commits into from
Closed
Changes from 2 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
5 changes: 5 additions & 0 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ changes:
Evaluate the following argument as JavaScript. The modules which are
predefined in the REPL can also be used in `script`.

*Note*: Please use double quote for the `script`, although it does not matter
Copy link
Contributor

Choose a reason for hiding this comment

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

@lukaszewczak Thank you for posting this.
I would suggest the following change:

*Note*: On Windows, using `cmd.exe` a single quote will not work correctly
because it only recognizes double `"` for quoting. In Powershell or
Git bash, both `'` and `"` are usable.
  1. Start with On Windows so it's clear that the note target Windows behaviur
  2. IMHO there is no need to compare to Linux (also the comparison is with Linux'es shells, the OS does care)
  3. Mention that it's only cmd.exe, as PS and bash on windows understand '

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you @refack for your comment. I made a change in note according to your suggestions.

on the Linux that you use double quote or a single quote, on the Windows it
makes a difference. On the Windows a single quote will not work correctly
because Windows shell traditionally uses double quote as the quote char.

Copy link
Member

@lpinca lpinca Sep 24, 2017

Choose a reason for hiding this comment

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

Tiny nit: can you please remove this spurious new line?

Edit: ignore me it seems to be consistent with the rest of the file.


### `-p`, `--print "script"`
<!-- YAML
Expand Down