Better abbrev expansion in shell-mode

One of the little things that has bugged me about shell-mode is that abbrevs don’t get expanded when you press RET. I have a number of frequently used commands and arguments abbreviated, but I have to hit a key to expand them before I send the line.

The solution is to advise comint-send-input.

(defadvice comint-send-input (before expand-input activate)
       "Expand input before sending"
       (expand-abbrev))
2008/08/05
Previously On Atomized:

Participate