UP | HOME

Use fortune as your eshell banner

Eshell displays a nice little welcome message when you start it up. By default it reads something like "Welcome to the Emacs shell". This message is stored in a custom variable, eshell-banner-message, which you can set in eshell-banner-load-hook.

(add-hook 'eshell-banner-load-hook
          '(lambda ()
             (setq eshell-banner-message
                   (if (executable-find "fortune")
                       (concat (shell-command-to-string "fortune -s") "\n")
                     (concat "Welcome to the Emacs shell " user-login-name "\n\n")))))