使用bash可编译完成(TAB),文件夹名称以'@'开头

问题描述 投票:1回答:1

我可以配置bash“自动完成”来理解文件夹名称,而不是从@开始吗?目前似乎尝试列出网络位置。

bash
1个回答
1
投票

您可以通过使用反斜杠(@)进行转义来自动填充以\开头的文件,如@lurker在评论中所提到的那样,或者使用引号前面的表达式(' | "):

反斜杠\

cd node_modules/\@myf - > [tab] - > cd node_modules/\@myfolder

单引号'

cd 'node_modules/@myf - > [tab] - > cd 'node_modules/@myfolder'

双引号"

cd "node_modules/@myf - > [tab] - > cd "node_modules/@myfolder"

© www.soinside.com 2019 - 2024. All rights reserved.