开发者

Can bash omit backupfiles when completing commands?

开发者 https://www.devze.com 2023-04-05 11:26 出处:网络
When completing commands, executables in $PATH and all, I would like to omit files named #foo# and bar~. I don\'t mind having these backup-files laying around, but prefer not to see them when completi

When completing commands, executables in $PATH and all, I would like to omit files named #foo# and bar~. I don't mind having these backup-files laying around, but prefer not to see them when completing commands. Do I need to somehow write a bash-completer function for 开发者_StackOverflow社区that?

It's completion of the first word at the prompt I am talking about;

bash# auda[TAB]


You can set suffixes to ignore using the FIGNORE variable:

export FIGNORE='~:#'

List the suffixes to be ignored, separated by colons.

For the full gory details see Programmable Completion in the Bash Reference Manual.

0

精彩评论

暂无评论...
验证码 换一张
取 消