I'm interested in naming Emacs buffers. In particular I'd like to give names to
shell buffers that I've started. That way I can easily tell them apart when switching buffers.
Go to the buffer you want to rename, in your case
*shell*. Then type
M-x rename-buffer and enter the new name for this buffer.
Add a function to your init.el, and create a keybinding:
(defun unique-shell () (interactive) (shell) (rename-uniquely) ) (global-set-key "\C-z" 'unique-shell)
Now every time you press ctrl+z, it will launch a shell with a new name.