sorry for the title, I have no better way to convey what is occurring to me. The situation is the following, I am using bash
, wezterm
(terminal emulator) and starship
(customizable prompt). But for some reason, every time I open a new terminal, it is always the stock/ default prompt, and I have to press enter or type something for it to pickup the updates. I have no idea what kind of behavior is happening here
As you can see, the first line is the line that has no styling applied, while the second line is how its supposed to look.
My observations are the following
- This always happens when opening a new terminal
- This does not seem to happen when I ssh into this machine
- This does not happen when I open a new terminal inside a terminal via multiplexer like
zellij
The weird thing is, that it works properly after typing anything. This is why I have no idea how to debug this. There is probably something weird happening that I am not aware of how it works.
My bash setup can be found here, but I'll outline the most important files here
my bash_profile
which just sources my .bash_rc
source ~/.bashrc
My .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
if [ -e ~/.bash_aliases ]; then
source ~/.bash_aliases >/dev/null 2>&1
fi
case $- in
*i*) ;;
*) return ;;
esac
.. truncated, other stuff is the default that comes in bashrc basically
And finally my .bash_aliases
unalias -a
set -o vi
...
# Have to install bash-preexec as well
[[ -e ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh
# here are the evals and they are 100% evaluated
source ~/.config/wezterm/wezterm.sh
eval "$(starship init bash)"
[[ -e ~/.config/personal/bash/alias_personal ]] && \. ~/.config/personal/bash/alias_personal
This also might be an issue with the library itself, but I highly doubt this. This behavior started occurring after I was fiddling with my config, its been months now.
echo "$PROMPT_COMMAND"
pleaseeval
on the command (don't get me started on that), we do need to see what you are sourcing.