We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c81f00 commit c71427eCopy full SHA for c71427e
1 file changed
init/modules/EESSI/2023.06.lua
@@ -222,7 +222,13 @@ local quiet_load = false
222
if os.getenv("EESSI_MODULE_UPDATE_PS1") then
223
local prompt = os.getenv("PS1")
224
if prompt then
225
- pushenv("PS1", "{EESSI/" .. eessi_version .. "} " .. prompt)
+ if mode() == "load" then
226
+ -- Prepend prefix to PS1 without evaluating its contents
227
+ execute{cmd="PS1='" .. prefix .. "'\"$PS1\"", modeA={"load"}}
228
+ elseif mode() == "unload" then
229
+ -- Strip the prefix from beginning of PS1
230
+ execute{cmd="PS1=\"${PS1#'" .. prefix .. "'}\"", modeA={"unload"}}
231
+ end
232
end
233
234
0 commit comments