There are three types of shells inside of Emacs.
I normally use
M-x shell because of following reasons:
- able to copy&paste as if it's normal emacs buffer
- able to control wrap/truncate line as if it's normal emacs buffer
helm-comint-input-ringhelps input old commands repeatedly
But, as it's widely known,
M-x shell (and
M-x eshell) are "dumb" terminal, so you cannot simply use pager cli (e.g. git log, less, man, htop).
So, I have to
M-x term for those cases. I recently found there are two "sub-modes" inside of
C-c C-j: change to term-line-mode
C-c C-k: change to term-char-mode
If you are in term-line-mode, each key stroke won't be sent to terminal, so basically you can navigate your cursor around whole buffer as if your in