命令行上的Mysql(不能使用所有键盘按钮)
直接从命令行使用 mysql(在 Ubuntu 9.10、标准 bash 终端上运行),我无法使用某些键盘按钮,例如:
Delete、Control-(向右箭头)、Control-(向左箭头)
分别返回给我:
~;5C;5D
。我假设 mysql 中一定有一个标志可以解决这个问题,但我一直找不到一个。是否有一个 .mysqlconfig 文件可以编辑以在启动时发生这种情况?
Using mysql directly from the command line (running on Ubuntu 9.10, standard bash terminal), I am unable to use certain keyboard buttons like:
Delete, Control-(arrow right), Control-(arrow left)
Which gets returned to me as:
~;5C;5D
respectively. I'm assuming there must be a flag in mysql that fixes this but I have been unable to find one. Is there a .mysqlconfig file to edit to make this happen on startup?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据此线程和
mysql --version
,mysql使用 editline 而不是 readline 进行编译。从该线程:虽然这对我不起作用。
该线程的另一个建议确实有效:
然后在
~/.bashrc
中添加别名此问题可能特定于 Ubuntu 9.10
According to this thread and
mysql --version
, mysql is compiled with editline instead of readline. From that thread:Although that didn't work for me.
Another suggestion from that thread did work:
Then add an alias in
~/.bashrc
This problem may be specific to Ubuntu 9.10