V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
yuzenan888
V2EX  ›  Linux

Bash Ctrl+R 搜索历史命令可以向前搜索吗?

  •  
  •   yuzenan888 · 2018-03-23 15:07:15 +08:00 · 3493 次点击
    这是一个创建于 2197 天前的主题,其中的信息可能已经有所发展或是发生改变。

    经常 Ctrl+R 按多了一下,然后就回不来了。

    man 文档说 Ctrl+S 可以向前搜索,但是我怎么试都不行。

    reverse-search-history (C-r)
           Search backward starting at the current line and moving `up' through the history as necessary.  This is an incremental search.
    forward-search-history (C-s)
           Search forward starting at the current line and moving `down' through the history as necessary.  This is an incremental search.
    
    3 条回复    2018-03-23 19:32:28 +08:00
    YORYOR
        1
    YORYOR  
       2018-03-23 16:51:49 +08:00
    亲测了一下 C-r 过了 直接 C-s 可以
    不过我是 zshell
    MyPassWordis
        2
    MyPassWordis  
       2018-03-23 17:50:04 +08:00 via iPhone   ❤️ 2
    stty -ixon
    关掉流控制
    yuzenan888
        3
    yuzenan888  
    OP
       2018-03-23 19:32:28 +08:00
    @MyPassWordis 谢谢,竟然好了!我是用 macOS 自带的终端。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3424 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 11:14 · PVG 19:14 · LAX 04:14 · JFK 07:14
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.