As much as most of my daily workflow revolves around Emacs, I always have GNOME
terminal ready to fly with Fish shell and
tmux. I keep EShell next to me for quick tasks,
but I have never relied on
ansi-term for other CLI-intensive
I don’t know what happened to the lovely “Emacs Chat” series from Sacha Chua,
but more than three years ago she interviewed Mickey
Petersen. Mickey talked with great
shell-mode and at the time I admittedly made a mental note
about giving it a try. Regretfully, I have only recently come back to that note.
My first M-x shell didn’t look that great. I haven’t debugged the
compatibility issues with Fish, probably something related to my heavily
config.fish. Anyway, falling back to Bash is enough.
(validate-setq explicit-shell-file-name "/bin/bash")
Note that I am using
validate-setq as explained
Another thing I have noticed is the lack of colours for the output of
ls. Fortunately, Emacs StackExchange has an
answer for that, so I have added
this line to my
alias ls="TERM=ansi ls --color=always"
The input echoing is easily turned off following the instructions on the
the history is much cleaner and easier to navigate with
(unbind-key "C-c C-l" shell-mode-map) (bind-key "C-c C-l" #'counsel-shell-history shell-mode-map)
bind-key are macros from
bind-key.el, which is
part of the fantastic use-package.
Last but not least, I like to have my shell buffer filling the whole window in the current frame. Thus, display-buffer-alist to the rescue.
(validate-setq display-buffer-alist `( ;; … other stuff … (,(rx bos "*shell") (display-buffer-same-window) (reusable-frames . nil)) ;; … other stuff … ))