In SLES 10.1 when you press the Tab key without typing anything in a directory you get a list of the directory. What is the setting for this so that I may set it in CentOS 5.4?
You need to have the bash-completion modules installed. Some distributions bundle them with bash, others package them seperately. Once they're installed, you need to activate them. In Ubuntu/Debian, that's done by sourcing
For CentOS 5, the process is documented here:
I'm guessing you're referring to SUSE listing everything in the current directory rather than showing you all the executable commands in your path, as bash by default has tab complete turned on and I've never heard of a distribution disabling it as standard.
Bash has the complete builtin command that allows you to customise the tab completion. There are several projects which provide some decent completions for many common tools. It's possible that this is what SUSE uses. You should be able to find the exact function that they use by looking through the bash startup files (which you can find listed in the very comprehensive (read: long) man page). One of those will source a collection of complete functions, one of which will do what you want.
I do have to ask the wisdom of tab completing to the contents of the current directory. I suppose showing you a list of 3-4000 programs isn't the most useful feature. If you have something in the command line already, does it tab complete the executable on your path or does it complete to something in the current directory?