I just recently started out with MacOS, but there one some strange completion behaviour with the bash
shell (compared to OpenSuse Linux with tcsh where I come from) that is bugging me:
For example, when I am in $HOME and write Pu on the command line, followed by tabbing for completion, I expected that one of the options shown would be my Public/ directory. However, as long as there are executable files, the completion never shows directories that share the same prefix. Only after entering Publ, the tab completion gives me Public/ as there are no more executables with that prefix.
So my question would be, is there an option to have the completion directly show executables and directories with the given prefix?
I already tried upgrading to bash 4 and installing bash-completion via homebrew but that did not help. I suspect that either the MacOS readline behaves differently or that there are some more setting for .inputrc which I do not know about.
I further know that by starting with ./ I only get directories. This is the bandaid that I use at the moment.
Tab
button twice? That will show a list of completions as far as I am aware.zsh
is behaving as you describe, butbash
find directly directories and executables at first. Could you add within your question: which shell you are using, and the output ofls -ld Pu*
?bash
in the question. The output of the ls is just thePublic/
folder. The executables starting withPu
are in some directories of thePATH
. You actually explained the behaviour nicely in your answer and I could verify it.