Commit d1baae3
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: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #33675
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>1 parent baa87c1 commit d1baae3Copy full SHA for d1baae3
File tree
Expand file treeCollapse file tree
5 files changed
+32
-8
lines changedOpen diff view settings
Filter options
- doc/api
- lib
- internal/repl
- test/parallel
Expand file treeCollapse file tree
5 files changed
+32
-8
lines changedOpen diff view settings
Collapse file
+9Lines changed: 9 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
283 | 283 | |
284 | 284 | |
285 | 285 | |
| 286 | + |
| 287 | + |
| 288 | + |
| 289 | + |
| 290 | + |
| 291 | + |
| 292 | + |
| 293 | + |
| 294 | + |
286 | 295 | |
287 | 296 | |
288 | 297 | |
|
Collapse file
+6-6Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
144 | 144 | |
145 | 145 | |
146 | 146 | |
147 | | - |
| 147 | + |
148 | 148 | |
149 | 149 | |
150 | 150 | |
| ||
177 | 177 | |
178 | 178 | |
179 | 179 | |
180 | | - |
| 180 | + |
181 | 181 | |
182 | 182 | |
183 | 183 | |
| ||
263 | 263 | |
264 | 264 | |
265 | 265 | |
266 | | - |
| 266 | + |
267 | 267 | |
268 | 268 | |
269 | 269 | |
| ||
611 | 611 | |
612 | 612 | |
613 | 613 | |
614 | | - |
| 614 | + |
615 | 615 | |
616 | 616 | |
617 | 617 | |
| ||
631 | 631 | |
632 | 632 | |
633 | 633 | |
634 | | - |
| 634 | + |
635 | 635 | |
636 | 636 | |
637 | 637 | |
| ||
682 | 682 | |
683 | 683 | |
684 | 684 | |
685 | | - |
| 685 | + |
686 | 686 | |
687 | 687 | |
688 | 688 | |
|
Collapse file
+5Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
291 | 291 | |
292 | 292 | |
293 | 293 | |
| 294 | + |
| 295 | + |
| 296 | + |
| 297 | + |
| 298 | + |
294 | 299 | |
295 | 300 | |
296 | 301 | |
|
Collapse file
test/parallel/test-readline-interface.js
Copy file name to clipboardExpand all lines: test/parallel/test-readline-interface.js+11-1Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
898 | 898 | |
899 | 899 | |
900 | 900 | |
| 901 | + |
| 902 | + |
| 903 | + |
| 904 | + |
| 905 | + |
| 906 | + |
| 907 | + |
| 908 | + |
| 909 | + |
| 910 | + |
901 | 911 | |
902 | 912 | |
903 | 913 | |
| ||
920 | 930 | |
921 | 931 | |
922 | 932 | |
923 | | - |
| 933 | + |
924 | 934 | |
925 | 935 | |
926 | 936 | |
|
Collapse file
test/parallel/test-repl-options.js
Copy file name to clipboardExpand all lines: test/parallel/test-repl-options.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
104 | 104 | |
105 | 105 | |
106 | 106 | |
107 | | - |
| 107 | + |
108 | 108 | |
109 | 109 | |
110 | 110 | |
|
0 commit comments