Thank you for supporting the Windows platform — it's great to be able to use ghostel on Windows.
However, I've encountered an issue with environment variables being modified when running under MSYS2 bash.
- Shell: MINGW64_NT-10.0-19045 (3.6.9-01d6c708.x86_64, 2026-05-24)
- OS: Microsoft Windows [Version 10.0.19045.3803]
- Emacs: GNU Emacs 32.0.50 (Development version d7b070b74c5f, built 2026-07-10)
Problem
When I launch ghostel, environment variables inherited from the terminal are altered after requiring ghostel. Specifically, the PS1 variable (bash prompt) gets changed, which modifies my shell prompt unexpectedly.
Steps to Reproduce
- Start Emacs with
emacs -Q
- Evaluate the following code:
;; Check PS1 value before requiring ghostel
(getenv "PS1")
;; => e.g. "expected prompt value"
(progn
(package-initialize)
(require 'ghostel))
;; Check PS1 value after requiring ghostel
(getenv "PS1")
;; => e.g. "unexpected modified prompt value"
- Observe that
PS1 has been changed after requiring ghostel.
Expected Behavior
PS1 and other inherited environment variables should remain unchanged after requiring ghostel.
Actual Behavior
After requiring ghostel, PS1 is modified, which causes the bash prompt to change from its expected appearance.
Normal prompt:
After ghostel:
The workaround is simple — just restore the environment variables to their original values after requiring ghostel.
(progn
(package-initialize)
(require 'ghostel)
(setenv "PS1" "\\[\\e]0;\\w\\a\\]\\n\\[\\e[32m\\]\\u@\\h \\[\\e[35m\\]$MSYSTEM\\[\\e[0m\\] \\[\\e[33m\\]\\w\\[\\e[0m\\]\\n\\$ "))

Thank you for supporting the Windows platform — it's great to be able to use ghostel on Windows.
However, I've encountered an issue with environment variables being modified when running under MSYS2 bash.
Problem
When I launch ghostel, environment variables inherited from the terminal are altered after requiring ghostel. Specifically, the
PS1variable (bash prompt) gets changed, which modifies my shell prompt unexpectedly.Steps to Reproduce
emacs -QPS1has been changed after requiring ghostel.Expected Behavior
PS1and other inherited environment variables should remain unchanged after requiring ghostel.Actual Behavior
After requiring ghostel,
PS1is modified, which causes the bash prompt to change from its expected appearance.Normal prompt:
After ghostel:
The workaround is simple — just restore the environment variables to their original values after requiring ghostel.