Cygwin的:控制-R反向我搜索在bash:你怎么"复位"搜索? [英] Cygwin: Control-r reverse-i-search in bash: how do you "reset" the search?

查看:111
本文介绍了Cygwin的:控制-R反向我搜索在bash:你怎么"复位"搜索?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问:你怎么知道<大骨节病>控制 + <大骨节病>研究反向我搜索到复位本身,并开始从底部搜索您的每一次历史?

Question: How do you tell Ctrl+r reverse-i-search to "reset itself" and start searching from the bottom of your history every time?

背景::当使用在bash反向我搜索,我总是会被卡住一旦完成穿越历史搜索并不能找到任何更多的比赛。有时候我打<大骨节病> ESC 和重新调用<大骨节病>控制 + <大骨节病>研究第二次,希望它开始从我的历史底部一个全新的搜索。然而,指针似乎仍是它在我的历史不放过previous地方。

Background: When using reverse-i-search in bash, I always get stuck once it is finished searching up through the history and it cannot find any more matches. Sometimes I hit Esc and re-invoke Ctrl+r a second time, expecting it to start a fresh new search from the bottom of my history. However the "pointer" still seems to be at the previous place it left off in my history.

问题是,我通常不希望这种行为。如果我打<大骨节病> ESC ,然后再调用<大骨节病>控制 + <大骨节病>研究,我想这表明它应该再重新开始从底部和工作的方式回来了。

The problem is, I usually do not want this behavior. If I hit Esc, and then re-invoke Ctrl+r, I would like that to indicate it should re-start from the bottom again and work its way back up.

更新:我想我应该我在Windows上使用Cygwin已经提到的那样,没有那么远提到的解决方案的工作

Update: I guess I should have mentioned I am using Cygwin on windows, as none of the so-far mentioned solutions work.

更新:这个问题被标记为潜在的重复问题。这个问题不是原因如下重复:

Update: This question was marked as a potential duplicate question. This question is not a duplicate for the following reasons:


  • 备用的问题不处理的Cygwin

  • 备用的问题不处理如何重置搜索到其初始状态(而不是它涉及只需在搜索倒退以及前锋)。

  • The alternate question does not deal with Cygwin
  • The alternate question does not deal with how to reset the search to its initial state (instead it deals with simply going backward in search as well as forward).

推荐答案

我从来没有试图使这个默认的打逃跑的时候,但Bash使用的readline 输入,它接受Emacs风格的键绑定在默认情况下,这样你就可以使用到底层,米 - > (通常是通过结合元/ ALT,要么> 或者在与Escape键> )。

I never tried making this the default when hitting Escape, but bash uses readline for input, which accepts Emacs-style keybindings by default, so you can go to the bottom using M-> (usually either by combining Meta/Alt and > or by following the Escape key with >).

如果米 - > 不起作用,因为你的终端没有让你进入,尝试 ^ g (控制和同时进行)。这是在Emacs取消中风和通常与工作原理的readline 了。

If M-> does not work because your terminal does not let you enter that, try ^G (Control and G simultaneously). That is the "cancel" stroke in Emacs and usually works with readline too.

这篇关于Cygwin的:控制-R反向我搜索在bash:你怎么&QUOT;复位&QUOT;搜索?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆