Bug #72071 no month-day in "prompt"?
| Submitted: | 18 Mar 2014 19:38 | Modified: | 9 Dec 2014 19:22 |
|---|---|---|---|
| Reporter: | Programmer Old | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Command-line Clients | Severity: | S4 (Feature request) |
| Version: | 5.6.14-log, 5.6.23 | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[18 Mar 2014 19:38]
Programmer Old
[31 Mar 2014 9:54]
Hartmut Holzgraefe
Looking at the code tm_mday, and also the less important tm_yday and tm_isdst, parts of "struct tm" are not handled anywhere, so printing the full date in the prompt is not possible: client > egrep -o "tm_[[:alpha:]]+" mysql.cc | sort | uniq tm_hour tm_min tm_mon tm_sec tm_wday tm_year
[9 Dec 2014 19:22]
Sveta Smirnova
Thank you for the reasonable feature request.
[20 Sep 2020 8:17]
Sveta Smirnova
Added option \M for having day of the month in the prompt (*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: bug72071.diff (text/x-patch), 446 bytes.
[20 Sep 2020 8:18]
Sveta Smirnova
Example on how contributed code works: mysql> prompt \O \M > PROMPT set to '\O \M > ' Sep 20 >
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.052 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.