Closed jamesdeacon closed 9 months ago
What terminal is this and what is the output of locale
?
Screenshot is from iTerm but I see the same behaviour on MacOS Terminal.
Output of locale is:
LANG="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_CTYPE="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_ALL=
Does the output of the following command contain colored bits? Could you post a screenshot?
php artisan --version
This needs to be run in the project directory.
Yes it does, and it matches the color used in the prompt element.
Wow. They'll probably fix this so that colors aren't written when stdout is not a TTY, but in the meantime I can add a workaround.
Please send me the output of the following command. Hopefully it'll be the last one I'll ask you to run.
printf '%q\n' "$(php artisan --version)"
Sure thing, here's that output:
Just for reference, php artisan --version
outputs the color on projects that are on Laravel 9 too but the cursor is in the correct position and the color on the prompt element is correct too
Fixed. Please update powerlevel10k and verify whether it now works correctly for you.
Just for reference,
php artisan --version
outputs the color on projects that are on Laravel 9 too but the cursor is in the correct position and the color on the prompt element is correct too
Apparently, versions prior to 10 don't have this bug: they output colors only when the stdout is a TTY. You can verify this with php artisan --version | cat
. The output should not have colors but with 10.40.0 it does.
I've installed powerlevel10k using brew. What's the best way for me to update seeing as brew is showing as up-to-date
You could ditch brew for now and use the manual installation option, at least until I cut a new release.
~/.zshrc
:
source $(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc
exec zsh
.I've done that and it's not showing a Laravel version at all anymore:
This is also the case on any Laravel projects, not just Laravel 10.
I still have the laravel_version
set in my POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS
🤦♂️ https://github.com/romkatv/powerlevel10k/commit/f5d5abfe1f89e5ea0d6f7cde6f3d9cd4b7c89d14
Please try again.
Hooray! All working
Thanks so much
Thanks a ton for you help on this issue: from reporting and remote debugging to verifying and even catching the silly bug I pushed! <3
When the Laravel prompt element is turned on and Laravel 10 is installed, the cursor shows up in the incorrect position, see screenshot for more detail. On top of this the Laravel version number is also showing in the incorrect color, it should be showing in red as it does for all other Laravel versions.