Closed arundeep78 closed 2 years ago
@arundeep78 the problem seems to be git. The command git -C --no-optional-locks -c core.quotepath=false -c color.status=false status -unormal --branch --porcelain=2
errors with exit code 129. I see the -C parameter isn't filled in, which makes it fail.
@arundeep78 did a small fix, BUT, you might also want to update git.
@JanDeDobbeleer Thanks for fast response. So I can update Oh-my-posh with new release using this command?
sudo wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh
When I tried it, the issue still remains.
apt install git
says that git is the latest version on this Debian instance.
Reading package lists... Done Building dependency tree Reading state information... Done git is already the newest version (1:2.11.0-3+deb9u7).
I ran the debug again and noticed that the error message you pointed out has changed now to below message
2021/12/21 22:11:39 error: runCommand
cmd.Start() failed with 'Unknown option: --no-optional-locks
usage: git [--version] [--help] [-C
@arundeep78 git 2.11 is 5 years old. I don't care what Debian says, that's simply not OK.
This could do the trick (didn't validate):
sudo add-apt-repository ppa:git-core/ppa -y
sudo apt-get update
sudo apt-get install git -y
git --version
@JanDeDobbeleer Sorry, I just installed this Debian yesterday on WSL2 and naively assumed that it is latest. Just checked that it was Debian 9/stretch!! Upgrading to Debian 10 then to 11. I should have updated git as well . I will check after upgrade and will update you.
@JanDeDobbeleer It is working now after 2 upgrades of Debian and your help. Thanks a lot
No need to say sorry. Good to hear it's resolved!
This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.
Code of Conduct
What happened?
I installed Oh my posh on WSL Debian using this blog. Everything seems to work fine except themes that use some icons. I have only experienced it with git so far. When I use powerlevel10k_rainbow, I do not get Github icon, neither the branch name. However, when I use powerlevel10k_classic then I do get branch name. Any other theme that should display github icon fails in the same way. I do get however icon for python. Not sure what is missing in some setup or configuration. I am setting up ZSH, oh-my-posh for the first time, so I might have missed some pre-requisite, but did not see anywhere in the documentation.
While generating log, I noticed that below command works with full path. But if I give ~/.poshtheme..... then it gives an error that file not found
Oh My Posh Error: stat ~/.poshthemes/powerlevel10k_rainbow.omp.json: no such file or directory
oh-my-posh --debug --shell uni --config="/home/arundeep/.poshthemes/powerlevel10k_rainbow .omp.json"
Thanks for help or pointing me to the correct configuration
Theme
powerlevel10k_rainbow or anyone that should display git icon e.g. jandedobbeleer
What OS are you seeing the problem on?
Linux
Which shell are you using?
zsh
Log output