diff --git a/doc/api/readline.md b/doc/api/readline.md index d572eb4bb29f9b..ecf9a777763215 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -281,6 +281,15 @@ added: v0.1.98 The `rl.setPrompt()` method sets the prompt that will be written to `output` whenever `rl.prompt()` is called. +### `rl.getPrompt()` + + +* Returns: {string} the current prompt string + +The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`. + ### `rl.write(data[, key])`