Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
yuzenan888
V2EX  ›  Linux

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

  •  
  •   yuzenan888 · Mar 23, 2018 · 4054 views
    This topic created in 2975 days ago, the information mentioned may be changed or developed.

    经常 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 replies    2018-03-23 19:32:28 +08:00
    YORYOR
        1
    YORYOR  
       Mar 23, 2018
    亲测了一下 C-r 过了 直接 C-s 可以
    不过我是 zshell
    MyPassWordis
        2
    MyPassWordis  
       Mar 23, 2018 via iPhone   ❤️ 2
    stty -ixon
    关掉流控制
    yuzenan888
        3
    yuzenan888  
    OP
       Mar 23, 2018
    @MyPassWordis 谢谢,竟然好了!我是用 macOS 自带的终端。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3053 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 06:47 · PVG 14:47 · LAX 23:47 · JFK 02:47
    ♥ Do have faith in what you're doing.