gpt4 book ai didi

MySQL 反向搜索

转载 作者:IT王子 更新时间:2023-10-29 00:31:08 26 4
gpt4 key购买 nike

在 mysql 客户端(命令行)中,我以前可以按 Ctrl+R 进行反向增量搜索,类似地您可以在 linux 控制台中执行此操作。由于某种原因,这在我的新机器上不起作用。

我正在使用来自 xampp 的 mysql 客户端。反向增量搜索适用于控制台,但不适用于 mysql。有谁知道如何“启用”这个?

谢谢

最佳答案

MySQL 5.6 使用 editline 库构建,而不是早期版本的 MySQL 中使用的 readline 库。因此,默认的键绑定(bind)可能与您习惯的略有不同。

默认情况下,Ctrl+R 仍应绑定(bind)到 em-inc-search-prev。它在我的环境中运行良好。

另请参阅:Bug #60465 MySQL-5.5 readline (editline) -- CTRL-R does not work

The key binding can be set via the ~/.editrc file by adding the following line: "bind "^R" em-inc-search-prev". See man editrc for more details.

并确保您的 MySQL 版本不受 Bug #49967 built-in libedit doesn't read .editrc on linux 的影响

如果您想查看当前的编辑行键绑定(bind),请暂时将此行添加到您的 $HOME/.editrc 的末尾:

bind

然后启动mysql客户端。它将输出当前识别的全套键绑定(bind)。

关于MySQL 反向搜索,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20363737/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com