Are you using shell-mode or something else (e.g. term-mode)? Completion works fine in term-mode (in term-char-mode) because it actually uses bash's completion mechanism. In contrast, shell-mode only does line-based interaction with the shell, and it generates its own completions. It recognizes commands like cd, pushd, and popd to maintain its own mirror of the current path. As far as I know, there is no shell-mode implementation that actually calls the shell for completions.