Closed earlev4 closed 2 years ago
@earlev4 you could actually make use of the command
segment to run that command and display the output. In case of an error, the segment isn't show. I'll see if we can make this a more permanent solution.
Hi @JanDeDobbeleer! I appreciate the quick and helpful response. Based on your feedback, I added the following code to the command
segment and the release is now I showing in the prompt to the right of the Ubuntu icon:
{
"type": "command",
"style": "diamond",
"foreground": "#000000",
"background": "#d3d7cf",
"properties": {
"shell": "bash",
"command": "lsb_release -r -s"
}
I will go ahead close the feature request.
Thanks so much! I sincerely appreciate your help and project!
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 would you like to see changed/added?
Good day! Thank you very, very much to @JanDeDobbeleer and the contributors of this excellent project! Your efforts and hard work are truly appreciated! I am new to oh-my-posh and quickly became a huge fan. I am running oh-my-posh on PowerShell and WSL2.
Currently, I am running two versions of WSL2 Ubuntu (18.04 and 20.04). I am hoping in a future release of oh-my-posh that the version of WSL2 Ubuntu could be added to the prompt. Often I am working in two sessions and have to run
lsb_release -a
to identify the release that I am working in. I suppose I could alter the config or change the background to differentiate between the two releases but I am really pleased with settings I already have.I searched 'Issues' and the closest request I found for this type of feature is #443. Please forgive the request if this functionality already exists and I overlooked it. As I mentioned, I am still new to oh-my-posh.
Just to note, I am using the powerlevel10k_rainbow.omp.json theme and the only portion that I changed was for Python. https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/powerlevel10k_rainbow.omp.json
Thanks so much! Again, I greatly appreciate the project.