Is there any (not too intrusive) way to make TAB-completion of aliases defined in ~/.bashrc work within an emacs shell (opened with M-x shell)?
For example, I have defined a command "foo" via alias foo="bar" in .bashrc. I can type "foo" in an emacs shell and execute the command, but I can't just type "fo" + TAB -- it won't be expanded to "foo".
I found Commands from .bashrc not available in Emacs but I'm not sure if this is the definite answer in terms of if it is possible or not. I tried to play with shopt -s expand_aliases
but not sure where I should put this exactly.
I work with Emacs 24.0.92 (9.0) on Mac OS X 10.7.3. I know that there is an issue about how PATH is set on the Mac, but that's not the problem here. I have precisely the same PATH as in the terminal.