Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
c09f3dc
doc: put release script specifics in details
MylesBorins Sep 18, 2020
2a4ae09
doc: update crypto.createSecretKey accepted types
panva Sep 17, 2020
68ea7f5
module: fix crash on multiline named cjs imports
ctavan Sep 18, 2020
9d91842
tools,doc: upgrade dependencies
aduh95 Sep 17, 2020
c5d27e1
tools,doc: enforce alphabetical order for md refs
aduh95 Sep 17, 2020
ec6b78a
doc: add `socket.readyState`
clarkkozak Sep 18, 2020
0c4540b
doc: fix heading space bug in assert.md
tlhunter Sep 23, 2020
7f35573
tools: ignore build folder when checking links
Sep 23, 2020
1893449
doc: revise dependency redirection text in policy.md
Trott Sep 20, 2020
b4514d4
doc: replace "this guide" link text with guide title
Trott Sep 21, 2020
b9d767c
doc: change type of child_process.signalCode to string
Sep 16, 2020
ef0d2ef
doc: move package config docs to separate page
aduh95 Aug 7, 2020
ab7d0e9
meta: update module pages in CODEOWNERS
aduh95 Aug 26, 2020
1d1ce1f
doc: document support for package.json fields
aduh95 Aug 7, 2020
5057318
module: exports pattern support
guybedford Aug 12, 2020
d7282c0
doc: edit subpath export patterns introduction
Trott Sep 18, 2020
dd53036
doc: fixup lutimes metadata
addaleax Sep 24, 2020
a8d3a7f
doc: put landing specifics in details tag
Trott Sep 25, 2020
0a847ca
doc: update napi_make_callback documentation
Flarna Sep 23, 2020
6dc6dad
doc: avoid referring to C array size
tniessen Sep 22, 2020
482ce6c
doc: improve N-API string-to-native doc
Sep 23, 2020
5da5d41
doc: refine require/import conditions constraints
guybedford Sep 23, 2020
353a567
deps: upgrade to c-ares v1.16.1
codebytere Sep 24, 2020
0d8eaa3
src: allow N-API addon in `AddLinkedBinding()`
addaleax Sep 22, 2020
1e1cb94
src: fix incorrect SIGSEGV handling in NODE_USE_V8_WASM_TRAP_HANDLER
korniltsev Sep 21, 2020
d7c28c9
test,child_process: add tests for signalCode value
Trott Sep 24, 2020
1758ac8
doc: added version 7 to N-API version matrix
NickNaso Sep 23, 2020
87dfed0
doc: add gpg key export directions to releases doc
danielleadams Sep 22, 2020
19b95a7
deps: upgrade to libuv 1.40.0
cjihrig Sep 25, 2020
f2635b3
test: replace annonymous functions with arrow
PoojaDurgad Aug 25, 2020
857e321
doc: set encoding to hex before piping hash
vbarzana Sep 25, 2020
86ac749
doc: add history entry for breaking destroy() change
kanongil Sep 24, 2020
0f4ecaa
repl: standardize Control key indications
Trott Sep 19, 2020
010173a
doc: edit n-api.md for minor improvements
Trott Sep 26, 2020
f551f52
module: named exports for CJS via static analysis
guybedford May 15, 2020
80eb221
tools: update ESLint to 7.10.0
cjihrig Sep 26, 2020
70ad69b
doc: outline when origin is set to unhandledRejection
mlarcher Sep 22, 2020
99a79e3
fs: fix fs.promises.writeFile with typed arrays
targos Sep 27, 2020
46a4154
doc: packages docs feedback
guybedford Sep 27, 2020
02db136
doc: alphabetize error list
Trott Sep 15, 2020
2e10616
doc: remove http2 non-link anchor tags
Trott Sep 12, 2020
c048607
2020-09-29, Version 14.13.0 (Current)
MylesBorins Sep 29, 2020
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
Prev Previous commit
Next Next commit
repl: standardize Control key indications
Throughout our messages and docs, we refer to the Control key in a
surprisingly varied number of ways:

* Control
* Ctrl
* Cntl
* varied capitalization on the above (e.g., ctrl vs. Ctrl)

Then, in key combinations:

* One of the items from the previous list followed by `-`
* ... or followed by `+`
* ... surrounded or not by `<` and `>`
* ... and inside backticks or not
* ... or just `^`

This is the start of standardization on the formulation recommended by
the Microsoft Style Guide (e.g., **Ctrl+C**).

PR-URL: #35270
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
Trott authored and MylesBorins committed Sep 29, 2020
commit 0f4ecaa741dbb9d3478a929ab2b44bd6f6f57a3c
24 changes: 12 additions & 12 deletions doc/api/repl.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ feature set.

The following special commands are supported by all REPL instances:

* `.break`: When in the process of inputting a multi-line expression, entering
the `.break` command (or pressing the `<ctrl>-C` key combination) will abort
* `.break`: When in the process of inputting a multi-line expression, enter
the `.break` command (or press **Ctrl+C**) to abort
further input or processing of that expression.
* `.clear`: Resets the REPL `context` to an empty object and clears any
multi-line expression being input.
Expand All @@ -45,7 +45,7 @@ The following special commands are supported by all REPL instances:
`> .save ./file/to/save.js`
* `.load`: Load a file into the current REPL session.
`> .load ./file/to/load.js`
* `.editor`: Enter editor mode (`<ctrl>-D` to finish, `<ctrl>-C` to cancel).
* `.editor`: Enter editor mode (**Ctrl+D** to finish, **Ctrl+C** to cancel).

```console
> .editor
Expand All @@ -63,10 +63,10 @@ welcome('Node.js User');

The following key combinations in the REPL have these special effects:

* `<ctrl>-C`: When pressed once, has the same effect as the `.break` command.
* **Ctrl+C**: When pressed once, has the same effect as the `.break` command.
When pressed twice on a blank line, has the same effect as the `.exit`
command.
* `<ctrl>-D`: Has the same effect as the `.exit` command.
* **Ctrl+D**: Has the same effect as the `.exit` command.
* `<tab>`: When pressed on a blank line, displays global and local (scope)
variables. When pressed while entering other input, displays relevant
autocompletion options.
Expand Down Expand Up @@ -246,14 +246,14 @@ added: v13.6.0
-->

The REPL supports bi-directional reverse-i-search similar to [ZSH][]. It is
triggered with `<ctrl> + R` to search backward and `<ctrl> + S` to search
forward.
triggered with **Ctrl+R** to search backward and **Ctrl+S** to search
forwards.

Duplicated history entires will be skipped.

Entries are accepted as soon as any button is pressed that doesn't correspond
with the reverse search. Cancelling is possible by pressing `escape` or
`<ctrl> + C`.
with the reverse search. Cancelling is possible by pressing **Esc** or
**Ctrl+C**.

Changing the direction immediately searches for the next entry in the expected
direction from the current position on.
Expand Down Expand Up @@ -282,7 +282,7 @@ repl.start({ prompt: '> ', eval: myEval });

#### Recoverable errors

As a user is typing input into the REPL prompt, pressing the `<enter>` key will
As a user is typing input into the REPL prompt, pressing **Enter** will
send the current line of input to the `eval` function. In order to support
multi-line input, the eval function can return an instance of `repl.Recoverable`
to the provided callback function:
Expand Down Expand Up @@ -379,8 +379,8 @@ added: v0.7.7
-->

The `'exit'` event is emitted when the REPL is exited either by receiving the
`.exit` command as input, the user pressing `<ctrl>-C` twice to signal `SIGINT`,
or by pressing `<ctrl>-D` to signal `'end'` on the input stream. The listener
`.exit` command as input, the user pressing **Ctrl+C** twice to signal `SIGINT`,
or by pressing **Ctrl+D** to signal `'end'` on the input stream. The listener
callback is invoked without any arguments.

```js
Expand Down
14 changes: 8 additions & 6 deletions lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,9 @@ function REPLServer(prompt,
sawSIGINT = false;
return;
}
self.output.write('(To exit, press ^C again or ^D or type .exit)\n');
self.output.write(
'(To exit, press Ctrl+C again or Ctrl+D or type .exit)\n'
);
sawSIGINT = true;
} else {
sawSIGINT = false;
Expand Down Expand Up @@ -815,7 +817,7 @@ function REPLServer(prompt,
if (e && !self[kBufferedCommandSymbol] && cmd.trim().startsWith('npm ')) {
self.output.write('npm should be run outside of the ' +
'Node.js REPL, in your normal shell.\n' +
'(Press Control-D to exit.)\n');
'(Press Ctrl+D to exit.)\n');
self.displayPrompt();
return;
}
Expand Down Expand Up @@ -860,7 +862,7 @@ function REPLServer(prompt,
if (self.editorMode) {
self.output.write(`${self._initialPrompt}.editor\n`);
self.output.write(
'// Entering editor mode (^D to finish, ^C to cancel)\n');
'// Entering editor mode (Ctrl+D to finish, Ctrl+C to cancel)\n');
self.output.write(`${self[kBufferedCommandSymbol]}\n`);
self.prompt(true);
} else {
Expand Down Expand Up @@ -1542,8 +1544,8 @@ function defineDefaultCommands(repl) {
const line = `.${name}${cmd.help ? spaces + cmd.help : ''}\n`;
this.output.write(line);
}
this.output.write('\nPress ^C to abort current expression, ' +
'^D to exit the REPL\n');
this.output.write('\nPress Ctrl+C to abort current expression, ' +
'Ctrl+D to exit the REPL\n');
this.displayPrompt();
}
});
Expand Down Expand Up @@ -1589,7 +1591,7 @@ function defineDefaultCommands(repl) {
action() {
_turnOnEditorMode(this);
this.output.write(
'// Entering editor mode (^D to finish, ^C to cancel)\n');
'// Entering editor mode (Ctrl+D to finish, Ctrl+C to cancel)\n');
}
});
}
Expand Down
9 changes: 5 additions & 4 deletions test/parallel/test-repl-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ function run({ input, output, event, checkTerminalCodes = true }) {

stream.write = (msg) => found += msg.replace('\r', '');

let expected = `${terminalCode}.editor\n` +
'// Entering editor mode (^D to finish, ^C to cancel)\n' +
`${input}${output}\n${terminalCode}`;
let expected =
`${terminalCode}.editor\n` +
'// Entering editor mode (Ctrl+D to finish, Ctrl+C to cancel)\n' +
`${input}${output}\n${terminalCode}`;

const replServer = repl.start({
prompt: '> ',
Expand All @@ -47,7 +48,7 @@ function run({ input, output, event, checkTerminalCodes = true }) {
const tests = [
{
input: '',
output: '\n(To exit, press ^C again or ^D or type .exit)',
output: '\n(To exit, press Ctrl+C again or Ctrl+D or type .exit)',
event: { ctrl: true, name: 'c' }
},
{
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ const errorTests = [
send: 'npm install foobar',
expect: [
'npm should be run outside of the Node.js REPL, in your normal shell.',
'(Press Control-D to exit.)'
'(Press Ctrl+D to exit.)'
]
},
{
Expand Down Expand Up @@ -453,7 +453,7 @@ const errorTests = [
/\.load/,
/\.save/,
'',
'Press ^C to abort current expression, ^D to exit the REPL',
'Press Ctrl+C to abort current expression, Ctrl+D to exit the REPL',
/'thefourtheye'/
]
},
Expand Down