- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitc2f6549
committed
psql: treat "--" comments between queries as separate history entries.
If we've not yet collected any non-whitespace, non-comment token for anew query, flush the current input line to history before readinganother line. This aligns psql's history behavior with the observationthat lines containing only comments are generally not thought of asbeing part of the next query. psql's prompting behavior is consistentwith that view, too, since it won't change the prompt until youenter something that's neither whitespace nor a "--" comment.Greg Nancarrow, simplified a bit by meDiscussion:https://postgr.es/m/CAJcOf-cAdMVr7azeYR7nWKsNp7qhORzc84rV6d7m7knG5Hrtsw@mail.gmail.com1 parent8388468 commitc2f6549
1 file changed
+14
-3
lines changedLines changed: 14 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
564 | 564 |
| |
565 | 565 |
| |
566 | 566 |
| |
567 |
| - | |
568 |
| - | |
569 |
| - | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
570 | 581 |
| |
571 | 582 |
| |
572 | 583 |
| |
|
0 commit comments
Comments
(0)