oh-my-posh: Strict mode doesn't work with rbash

Code of Conduct

  • I agree to follow this project’s Code of Conduct

What happened?

When I run the new code that supports strict mode with the following: oh-my-posh init bash --strict --config /jail/home/username/.poshthemes/material.omp.json

I get the following output printed to my rbash shell: echo "Unable to find Oh My Posh executable"

It appears that the new code with strict mode is still not detecting the correct path to the executable, which is located at /jail/usr/local/bin/oh-my-posh. The configuration file exists at the specified path and it isn’t malformed in any way, it was pulled directly from https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/material.omp.json

I’m not exactly sure what is going wrong, but another possible alternative (you could test it with rbash on your machine if you are running Linux) is to add rbash as another terminal type and just treat it the same way as you would bash. Not 100% confident that this would work, but it might 😃

Thanks for your help and your amazing work on this project, I love it!

Theme

Material

What OS are you seeing the problem on?

Linux

Which shell are you using?

other (please specify)

Log output

rbash-5.0$ oh-my-posh debug
Oh My Posh Error:

stat https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/v/themes/default.omp.json: no such file or directory

I have no idea where the /v/ is coming from, it isn’t present anywhere on the configurations written on my end.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (8 by maintainers)

Commits related to this issue

Most upvoted comments

I GOT IT! I had to run the following commands to set up the jail to support oh-my-posh:

sudo mkdir /jail/proc
sudo mount -t proc /proc /jail/proc/
sudo jk_cp -v -f /jail /usr/bin/tr

Now everything appears to be working as expected. Thank you so much for your help in this process! I’m closing this out now, I hope it can be of future use to anyone else who encounters this issue.

@ajmeese7 it seems this happens when the config can’t be found (the user can’t access it). This functionality was recently adjusted meaning it should now at least behave differently. Can you validate?

@JanDeDobbeleer 7.67.0

Edit: Just ran the script again and downloaded 7.69.0, same problem occurs.