【问题标题】:Is there a way to get Control+R style recursive command history searching in pry有没有办法在 pry 中获取 Control+R 样式的递归命令历史搜索
【发布时间】:2011-11-11 16:57:21
【问题描述】:

我最近一直在玩 pry。很多很棒的东西,但我发现自己错过了来自 irb 的 Control+R。 Pry 有the 'hist' command,但我仍然希望能够点击Control+R 并开始打字,而不是必须做hist --grep foo。我错过了什么吗?

【问题讨论】:

    标签: ruby pry


    【解决方案1】:

    您需要编辑主目录中的 .editrc 文件:

    nano ~/.editrc
    

    并添加这一行:

    bind "^R" em-inc-search-prev
    

    来源:pry wiki

    【讨论】:

    • 由于某种原因这对我不起作用。既不是在撬也不是 IRB,我想弄清楚为什么会失去理智
    • 为什么要以 root 身份运行它?
    猜你喜欢
    • 1970-01-01
    • 2017-07-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-16
    • 1970-01-01
    相关资源
    最近更新 更多