Hello all!
I’m having trouble tracking down how an environment variable is being set before Bash reads any of its configuration files. Specifically, the ${PROMPT_COMMAND}
environment variable is being set somewhere, and I cannot find out where.
The reason I’m asking about this is because when I open up Kitty, I get this error at the top of each prompt:
bash: command not found: prompt_command
This happens because ${PROMPT_COMMAND}
is set to execute prompt_command
, which fails.
I know that it’s being set before reading any of the configuration files because I added this line at the top of /etc/bash.bashrc
:
echo "Running /etc/bash.bashrc, prompt command = ${PROMPT_COMMAND}"
and this confirms when I open a new shell that ${PROMPT_COMMAND}
is set before any of these configuration files are read.
I can work around this by setting ${PROMPT_COMMAND}
in my bashrc, but I feel like this shouldn’t be necessary.
Any leads on where this environment variable setting could be hiding? /etc/environment
is empty, and I don’t see any “Environment Variables” section in YaST.
This is with Tumbleweed, specifically version 20250217
.