Recently I installed Zshell instead of Bash. During this, then I saw that my $PATH
was 7 miles long, - so I decided to try and clean it up a bit. When I uninstalled rvm
(by running rvm implode
followed by rm -rf ~/.rvm
) then when I restarted my terminal, I now see an error:
If I just press ENTER
, then the error remains. But if I do any other command, then it disappears (ls
, echo
, source ~/.zshrc
- you name it).
If I reboot iTerm
(or start a new tab), - then the error re-appears.
The error is not being showed, - so if I activate another theme, then I can't see if there is an error.
My gut feeling tells me, that it has something to do with my path, but I'm not sure. My path is waaay shorter than before RVM
was installed.
If i rename my ~/.zshrc
-file, then the Powerline9k
-theme gets deactivated, so I can't see if the error actually still appears or not. But I have tried it... Then a theme-less zshell just start up.
Any idea how to fix it or how to debug it?
EDIT
I just realized that it could actually have been a left-over-error, from back when I was running bash, - so I added that tag as well.
If the visual blemish disappears as soon as you execute any command as you say so, just place an echo -n
at the end of your .zshrc
as a quick and easy fix, if you are not up to the task of debugging and potentially causing more problems on your machine.
The issue isn't worth your time ;)
Edit: Apparently the above didn't work. See comments.
If you are interested in debugging, a good starting point would be to place set -xe
(print every line that is executing and abort on any line that exits nonzero) at the beginning (after the shebang line, or as flags in the shebang) of each configuration script that is executed when you start a new interactive shell.
Also consider set -xeuo pipefail
to additionally catch and abort on usage of unset shell variables and commands that return nonzero inside pipes (e.g. set -e
will not abort on false | true
because the overall line exited with status 0
, but -o pipefail
will abort on such a line). It is worth noting that these flags are bash
features, but since zsh
is a feature superset of bash
, they work in zsh
too.