I like the idea of command prompt coloring, and I was wondering how I can extend that to have the shell color the commands as I type it in or via tab completion. So for example, when I finish typing 'gcc', the shell should recognize that it is a valid command and color it green. If the command is not a recognized command then it should be colored in red and boldfaced.
This feature will help tremendously in typing in correct commands especially if you have long commandlines with pipelined commands which accidentally contain a typo. All command typos will be colored red and boldfaced so that I can easily identify which command I typed incorrectly.
I'm not sure that you can do this in
bash
. But it is possible in other shells, e.g. inzsh
(see: https://github.com/zsh-users/zsh-syntax-highlighting ) or infish
(see: http://fishshell.com/ ).