小编shi*_*ang的帖子

第一次完成后,Bash选项卡完成会增加额外空间

Bash选项卡完成在第一次完成后添加额外空间,如果compeletion目标是多级文件夹中的文件,则停止进一步完成.

例如,我在路径〜/ Documents/foo/bar.txt中有一个文件,我想列出它.输入时我遇到以下问题

a@b:~$ls Docu <TAB>
Run Code Online (Sandbox Code Playgroud)

我明白了

a@b:~$ls Documents |(<-this is the cursor, so there is an extra space afer Documents)
Run Code Online (Sandbox Code Playgroud)

所以我无法进一步完成标签.我必须退格以删除额外的空间.

通常我想得到:

a@b:~$ls Docu <TAB>
a@b:~$ls Documents/ <TAB>
a@b:~$ls Documents/foo/ <TAB>
a@b:~$ls Documents/foo/bar.txt
Run Code Online (Sandbox Code Playgroud)

bash tab-completion

18
推荐指数
2
解决办法
5168
查看次数

标签 统计

bash ×1

tab-completion ×1