Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get bash on OS X Lion to ignore .DS_Store files during tab completion?

I have lots of directories with a single file in them. The presence of .DS_Store files makes filename completion a little awkward. How do I tell bash to ignore .DS_Store files when I hit tab?

like image 442
sigjuice Avatar asked Aug 14 '11 16:08

sigjuice


2 Answers

Add this line to your .bash_profile file:

export FIGNORE=DS_Store
like image 118
EdoDodo Avatar answered Oct 14 '22 14:10

EdoDodo


A better method is to also exclude the other things that might already be in FIGNORE using

export FIGNORE="$FIGNORE:DS_Store"

like image 20
Chris Pierce Avatar answered Oct 14 '22 15:10

Chris Pierce