Jamie Wilkinson said: > This one time, at band camp, Taryn East wrote: >>If I have a file called foobar and a directory called foobaz and I type >>"cd foo" and hit <tab>... >> >>why does tab-completion offer both choices? >> >>AFAIK it makes no sense to cd to a file - so I was wondering why >>tab-completion isn't intelligent enough to just not bother with files. > > You're using bash? zsh's completion is already smart like that and knows > about what files a command takes, so tab completion of cds arguments only > offers directory names.
The default completion for bash can be a bit braindead. You could install this additional completion functionality for bash from here: http://www.caliban.org/bash/index.shtml It also gives you fun stuff like host, group, user and command option completion as well (quite like what zsh has). -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
