Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我希望 Bash 只为我可以运行.foo的命令完成带有扩展名的文件名bar
.foo
bar
$ complete -f -X '!*.foo' bar
但是,这会禁止完成文件之前的.foo目录。如何保存目录的完成?
完成 -f -o plusdirs -X '!*.foo' 栏