Little-known fact about Eshell: not only can you implement your prompt functions and highlighting in lisp, you can also (a) pipe output directly to buffers and (b) invoke M-x commands from the shell:
;; It must be possible to declare a local default-directory.
make-local-variable is an interactive built-in function in `C source
code'.
(make-local-variable VARIABLE)
Make VARIABLE have a separate value in the current buffer.
Other buffers will continue to share a common default value.
(The buffer-local value of VARIABLE starts out as the same value
VARIABLE previously had. If VARIABLE was void, it remains void.)
Return VARIABLE.
I know I should be using eshell, particularly now that daemon mode is "stable" on OS X, but there is a lot of unlearning involved when grep pops up a result buffer. Why, yes, as a matter of fact, my beard is grey.
Not much beats urxvt, but even gnome-terminal beats ansi-term.
urxvt:
real 0m0.314s
user 0m0.080s
sys 0m0.040s
gnome-terminal:
real 0m1.228s
user 0m0.090s
sys 0m0.040s
ansi-term:
real 0m6.493s
user 0m0.150s
sys 0m0.030s
Also, ls --color=auto really messes up ansi-term. It glitches all over the place and I think treats some color codes as carriage returns or other motion commands for some reason.
+1 definitely! Thank you for a great and refreshing info on shells! I've been using eterm only since I started using Emacs about three years ago, and didn't even know about ansi-term and friends.
I've been put off by M-x shell because it only offers "line" interaction, so bash tab completion doesn't work. M-x term looks much better, but "ls /usr/bin" stalls the output part way through with my cursor off in the middle of the screen until I type a character in char mode, and I see stuff like
error in process filter: cd-absolute: /hom/: no such directory
error in process filter: /hom/: no such directory
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.
git <TAB> completes filenames, but so does bash in terminal. I don't have any fancy bash completion dingleberries installed. (And yes, my beard is grey too.)
The alias completion does appear broken, as you demonstrated.
What you're seeing is not bash tab completion based on compgen, but shell-mode's implementation of tab completion. Which is why git <TAB>, for example, does not do what you'd like. It seems like it should be possible to write an emacs tab completer that actually calls bash's compgen, but I'm not aware of an implementation of this.
a) $ ifconfig > #<buffer interfaces>
b) find-file README.txt # same as doing C-x C-f