Skip to content
Closed
Changes from 1 commit
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
Next Next commit
docs: clarify usage cli options -e,-p on windows
Fixes: #15522
  • Loading branch information
lukaszewczak committed Sep 23, 2017
commit 34e55cd2f7386472d038e8780a3a290a986fa537
5 changes: 4 additions & 1 deletion doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ 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
Copy Markdown
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
Copy Markdown
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.

### `-p`, `--print "script"`
<!-- YAML
Expand All @@ -65,7 +69,6 @@ changes:

Identical to `-e` but prints the result.


### `-c`, `--check`
<!-- YAML
added:
Expand Down