Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can bash omit backupfiles when completing commands?

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 that?

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

bash# auda[TAB]
like image 663
Daniel Avatar asked Sep 14 '11 21:09

Daniel


1 Answers

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.

like image 180
martin clayton Avatar answered Sep 30 '22 01:09

martin clayton