[opensuse] mariadb command line - pageup/down not working ?
With the mysql command line shell, one is able to use pageup/down to search through command history and find a previous command matching the input, just like in the unix shell. With mariadb this no longer sems to work - when I type in the beginning of a query and hit PageUp, all I get is a tilde ? -- Per Jessen, Zürich (7.5°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hello, Use --auto-rehash at the command line when starting mysql or comment the no-auto-rehash line in your my.cnf config file (in the [mysql] section). Best Regards, I. Petrov On 03/26/2015 01:54 PM, Per Jessen wrote:
With the mysql command line shell, one is able to use pageup/down to search through command history and find a previous command matching the input, just like in the unix shell. With mariadb this no longer sems to work - when I type in the beginning of a query and hit PageUp, all I get is a tilde ?
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVFDj4AAoJEH8sJoKRFRU5kREP/ijZCrn2fHBO6MmXfM8Hd5+4 dqKcNEKkNI9bx9FStbCiIzHw1fJ7rpqHHcLMBr3RhpP3jBgVEVd+NgrnsrpsfJnd QGSw2e6Pe7SWlvzpy2cLAYjUHYM/KtxWukSnkMWhg9yCdfZrFtbyWG2JPmLzisqs JDeSBuOKy/O7bKhO8I/GDvgSC1GzmQm/4PwuHr0aiKUs83EfNw5tF5D9r8gP3slp V6AIUd7ZXjRte+8+mHoUcfboaHdI/8BDRai+RhAhRS21sYl/coSr48OkxjUkRvcs tgHYJOVfEWUQ3j7oE0VTI4r7dYghI6jQEkF3A8qx6/DQiv92JtZEni7xhxjUSSSZ p+CRDRnMig5pJUbbfYxIto5SEHuEtw0misTSFB3q8xcEfR2XUV3rurk9T9Pd8mww DMvav6GA/JN4LtAnf3FIB5Mbyq8D2P0eEsegyppi+9pxT/Kc7JVjgMdytl/jNaj1 uqcN4wjIvo6fmVUzF37JpzXeY9c0ZMzh1+8W50TXprL+pNWOw6V3f8rKd//fFQhs HsHeO9HeekKdeohj20cbLQ8SUf9QnHRQxnMyOJsPpLWDagmejXZT9Aho6nreQbTv ajTmTm7Y7SVPQ53nZp7I47j4tz7KXKsMTBVOsLxFZKB96hI+uKUHlczaH6Qfy9AI u4SfxB9FuArCI9b73uYz =ZM+5 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
I.Petrov wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Hello,
Use --auto-rehash at the command line when starting mysql or comment the no-auto-rehash line in your my.cnf config file (in the [mysql] section).
Hmm, no-auto-rehash isn't mentioned in my.cnf at all, and according to the mysql manual it (auto rehashing) is on by default. I can also confirm that command completion for database, table and column names works just fine. Anyway, see bug#924542. /Per -- Per Jessen, Zürich (6.9°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hello, The mysql documentation says that the key sequences are the same as those in the standard shell and depend on the input library used to build mysql (readline in my case and probably in yours ... can be checked from the mysql shell by executing \s). So back to the problem ... if PgUP does not work as expected this is because the escape code for the same is not binded properly or at all. For example my PgUP key produces: [5~ which can be seen by pressing Ctrl-x and then PgUP in the console. This escape code is binded as follows on my machine: bind -p | grep "\[5~" "\e[5~": history-search-backward and probably not on yours. The escape code can be binded permanently by adding: "\e[5~": history-search-backward in the $HOME/.inputrc file. Please note that other keys are also binded to history-search-backward (at least in my installation) and they provide the same functionality in mysql and the console (e.g. Ctrl-UP). Hope that this will help you. Best Regards, I. Petrov On 03/26/2015 08:21 PM, Per Jessen wrote:
Hmm, no-auto-rehash isn't mentioned in my.cnf at all, and according to the mysql manual it (auto rehashing) is on by default. I can also confirm that command completion for database, table and column names works just fine.
Anyway, see bug#924542.
/Per
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVFoiXAAoJEH8sJoKRFRU5I0IP/iR5G9vCBErMddYX71dRwTTQ v/kl3Hzurt+WyroGz3TzhLnGEtIKEp9YkkDU2yONLbZCpKPkmJ+foIsVxJyLwXr9 0kBOTTJgKzj12HZvC1gZ9TUv8iw8Cdt6GeuXP9RDPgoO/pkgE6OeZVDerAFI7aLp Vv9ualFjX1zryKgEH45lQWlIiNjVOsg9zXggtRlzaNZBoEOhwMQoGL2MUSoWCHkv eZJgbADuwJXl2j9PZi8UzHhKXT7OTlNR6GMBGCJOzptdSP+mH9XRjIvUkFHT4YQT Andmbq4KqF0DBeo7Lxwmtsil9+5/VoWi8hQIl7StnAlvzmC+Ry23rlmNYc3PI+sD 2PQRpjVZvMyNd2NaQGXjgr+D0Ej6sz5PNH67EgMulgDFJRwmRl/12ed85Cl+T/Ty iOIzQ4xuqAjEPTVAqc9MKGjoCbX81VHCdbEXcbaZlJsuQRfKGzxgXAem+higbHBM bgP+yOWc4mILKJr9N6OQJQyL3v7p2/rfK3uoz7u+FIViL4Wji3PUQ75Ra7dzCe9Q RJja73ATlY/MbS57X2RGnkKT/G/TyOCTsz9/NWnIyDLj737S8xaWy4aImuDOYxAD x5XLEr/48jno+Jfy9nlaxDKyeWL12q3j+KfGtlsYEBe0LqzVPSjzoTrINyRH3ySu 6x9vfIw/Nj6yDPc1hiMU =uDm7 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
I.Petrov wrote:
The mysql documentation says that the key sequences are the same as those in the standard shell and depend on the input library used to build mysql (readline in my case and probably in yours ... can be checked from the mysql shell by executing \s).
Yep, readline 5.1.
So back to the problem ... if PgUP does not work as expected this is because the escape code for the same is not binded properly or at all. For example my PgUP key produces:
[5~
Same here.
which can be seen by pressing Ctrl-x and then PgUP in the console. This escape code is binded as follows on my machine:
bind -p | grep "\[5~" "\e[5~": history-search-backward
and probably not on yours.
Looks good on mine too: bind -p | grep '\[5~' "\e[5~": history-search-backward PgDn is good too.
Hope that this will help you.
Thanks for all your input - does PgUP/PgDn work in your mysql (as supplied by mariadb-client-10.0.13)? /Per -- Per Jessen, Zürich (9.2°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hello, Yes, the PgUp and PgDn keys are working properly however my client and MariaDB are version 5.5.33-2.2. Best Regards, I. Petrov On 03/28/2015 01:15 PM, Per Jessen wrote:
I.Petrov wrote:
The mysql documentation says that the key sequences are the same as those in the standard shell and depend on the input library used to build mysql (readline in my case and probably in yours ... can be checked from the mysql shell by executing \s).
Yep, readline 5.1.
So back to the problem ... if PgUP does not work as expected this is because the escape code for the same is not binded properly or at all. For example my PgUP key produces:
[5~
Same here.
which can be seen by pressing Ctrl-x and then PgUP in the console. This escape code is binded as follows on my machine:
bind -p | grep "\[5~" "\e[5~": history-search-backward
and probably not on yours.
Looks good on mine too:
bind -p | grep '\[5~' "\e[5~": history-search-backward
PgDn is good too.
Hope that this will help you.
Thanks for all your input - does PgUP/PgDn work in your mysql (as supplied by mariadb-client-10.0.13)?
/Per
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVFpHDAAoJEH8sJoKRFRU5v+AQAIURFxEK8uE7LKmuG1qof/D6 YEt/+Gs6DIN7Snk1nipIQqUaNp6F1J8EGxrkqEhkBX4P0uXurhkCgB7Xb7M0Koq2 BgaTVZzXXjFklDvSaB1NYXU058CtRcKh7U75ODX1vGCEMyxZz53jET9ouqOFP6s9 2lLknIr+bZOH9yWPX7TIULtJwCmjH5G1A+dgmHewKpj+i6fhkAFdordaCwOXpXjV ztkz30XbbsyzS096r6yGIBnl9T6enp0ZV3ILvUvxtgcBTvndXVUikETEPpqA9bGx dSxyUOclDsQtOIRqnGko/Eoa+YhdBlzYgcPTh+HE9nAoJTBqkQlZXO8hsaAMcmW9 pZl5U9uSavy9zbklFEHElW2OnOOc740ElWmLjlBx5UzHV1J/VFONVKcBMUaoDeEN h9Ipz4xM+sZ3kPMCEBKvfLpIB60O/II5xIWHkrJdwBJ/2a/FOPZyFj8QMIDxMbw4 69wd0FSs3vs2s0cejtqXHnFpl8ltZBXuQRCRmSOdVfpDsEXbRxWQhS8cLTVlY5h4 EG7auJA14cOX/ycl2Jgv0sA8YVK6FuxUaIMhrGDkt+Rsk0MlCQ5oZrzPyfVhA1xm PyZpNqnxhY7dOOEEbLNFfAy7O80rcmWxWcyhaSKw0Veeqo7SReVOQeAF/nfu/XkH onoyo/kJE2LV4kzNHCjI =j+5C -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
I.Petrov wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Hello,
Yes, the PgUp and PgDn keys are working properly however my client and MariaDB are version 5.5.33-2.2.
I have a system with mariadb 5.5.33-1.16, also works fine. -- Per Jessen, Zürich (11.8°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
I.Petrov
-
Per Jessen