diff --git a/doc/api/readline.md b/doc/api/readline.md index 14b416b1e8045b..8f96616fd235c6 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -283,6 +283,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])`