我怎样才能让庆典卡完成的行为像vim标签完成和循环匹配匹配? [英] How can I make bash tab completion behave like vim tab completion and cycle through matching matches?

查看:150
本文介绍了我怎样才能让庆典卡完成的行为像vim标签完成和循环匹配匹配?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直寻找一个解决方案多年了。

I've been meaning to find a solution for this for YEARS.

我SOOO vim的更高效操纵比bash的文件时,这个原因。

I am sooo much more productive in vim when manipulating files than bash for this reason.

如果我有

file_12390983421
file_12391983421
file_12340983421
file_12390986421

在bash和键入file_1->标签,它显然列出:

In bash and type file_1->tab , it obviously lists:

file_12390983421 file_12391983421 file_12340983421 file_12390986421

这是一个可怕的野猪和痛苦的工作。

And this is a horrible boar and painful to work with.

同样的序列Vim会遍历文件一次。

The same sequence in vim will loop through the files one at a time.

请有人告诉我如何做到这一点在bash,或是否有另一种外壳,能做到这一点,我会切换的明天。

Please someone tell me how to do this in bash, or if there is another shell that can do this, I'll switch tomorrow.

推荐答案

默认情况下设置页绑定到完整 readline的命令。你期望的行为将是菜单完成来代替。您可以通过编辑〜/ .inputrc文件更改readlines方法设置。要重新绑定设置页,加入这一行:

By default TAB is bound to the complete readline command. Your desired behavior would be menu-complete instead. You can change your readlines settings by editing ~/.inputrc. To rebind TAB, add this line:

TAB: menu-complete

有关详细信息,请参阅男子猛砸 READLINE 部分

For more details see the READLINE section in man bash.

这篇关于我怎样才能让庆典卡完成的行为像vim标签完成和循环匹配匹配?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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