In Doom Emacs many commands that replace the buffer in the current window with a different buffer will automatically select the most recent buffer that you have had open in a window. But buffers that are not visiting files, such as
*shell* will never be considered the most recent.
This is how it seems to work:
All buffers are in a stack. Buffers currently currently being displayed in windows are put on the bottom of the stack because you don't need to select them. When a buffer in a window is replaced by another buffer it is put on the top of the stack. When you execute one of the buffer switching commands, the default selection is whichever buffer is on top of the stack. But for some reason buffers that aren't visiting files are either inserted lower in the stack or skipped over when deciding the default selection even though they are on top of the stack.
These are some of the commands I've found that behave this way:
I've found that
helm-mini have a more consistent behavior with all buffers regardless of whether they are visiting a file or not. They will allow, for example, a
term buffer to be the default selection when it is the most recently hidden buffer.
I've found that removing the asterisks from the buffer name has no affect and the mode of the buffer does not seem to matter.