Colors in Emacs shell prompt

后端 未结 4 2086
故里飘歌
故里飘歌 2021-01-17 14:39

Is it possible to use colors in the Emacs shell prompt (the prompt itself, not the rest of the shell screen) with the bash PS1 variable? I believe I have the syntax correct

4条回答
  •  甜味超标
    2021-01-17 15:20

    I would recommend not to change the face globally (since there are many comint users besides shell mode) but in a buffer specific manner by setting a mode hook:

    (add-hook 'shell-mode-hook
          (lambda ()
            (face-remap-set-base 'comint-highlight-prompt :inherit nil)))
    

提交回复
热议问题