Commit 60a97c0b authored by Mattias Runge-Broberg's avatar Mattias Runge-Broberg Committed by Node.js GitHub Bot
Browse files

readline: add getPrompt to get the current prompt



Since there is a setPrompt() there should be a getPrompt().
There are use-cases where it is needed to know what the
current prompt is. Adding a getPrompt() negates the need
to store the set prompt externally or read the internal
_prompt which would be bad practice.

Co-authored-by: default avatarColin Ihrig <cjihrig@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/33675


Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarAnto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: default avatarBenjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: default avatarRuben Bridgewater <ruben@bridgewater.de>
Reviewed-By: default avatarMichaël Zasso <targos@protonmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarJuan José Arboleda <soyjuanarbol@gmail.com>
parent 3c38445c
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment