oh-my-posh | latency cross platform/shell prompt renderer | Command Line Interface library
kandi X-RAY | oh-my-posh Summary
kandi X-RAY | oh-my-posh Summary
A prompt theme engine for any shell.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of oh-my-posh
oh-my-posh Key Features
oh-my-posh Examples and Code Snippets
Community Discussions
Trending Discussions on oh-my-posh
QUESTION
I wanted to get started with posh and oh-my-posh so I installed them according to this article. Microsoft docs. I got the theme but the edges didn't had that arrow(that coolness).
I then downloaded the windows terminal and edited the setting.json there with
...ANSWER
Answered 2021-Feb-19 at 17:57If I understand correctly, there are two parts to the question.
Changing the PowerShell Window FontTo do this, right-click your PowerShell window and head to "Properties"
There, you can choose the header "Font" and change your font to Cascadia Code PL".
This should fix the problem. If you still experience some weird characters, you might need to install a Nerd Font instead.
Changing the VS Code Terminal FontTo use the font in the VS Code Terminal, head to Settings.
Searching for "integrated terminal font family" should bring up the setting you need to edit. Here, add your font 'Cascadia Code PL' on the very front of the setting and save.
You should now be able to open a terminal and use the PL prompt.
QUESTION
I'm using oh-my-posh v3 in Windows Terminal.
If I'm in a non-git directory, my prompt looks like this...
but, in a git-enabled directory it looks like this...
I've exported the theme's definition to json and, as you can see, I can't find anything that seems to be responsible for the first block in the prompt.
...ANSWER
Answered 2021-Apr-15 at 15:32The answer turned out to be simple; remove Import-Module posh-git
from my $profile
QUESTION
I want to import a few modules (posh-git, oh-my-posh, etc) only when PowerShell is launched from Windows Terminal. When PowerShell is launched using conhost or from Cmder, these imports should be excluded.
But I can see that $profile
points to the same file when I open PowerShell from Windows Terminal or conhost or Cmder.
Is there a way I can identify the current terminal being used so I can do something like this in my $profile
file?
ANSWER
Answered 2020-Jul-25 at 11:18You can use one of the automatic variables WSLENV
,WT_PROFILE_ID
or WT_SESSION
to check if Powershell runs in Windows Terminal. They do not exist in "standalone" Powershell.
For example:
QUESTION
I use PowerShell as my shell on Windows 7. I find that ConEmu is a really good terminal. Since I am not on Windows 10, I cannot use Windows Terminal but ConEmu is not bad at all. I found out about posh-git and oh-my-posh and how they can customize your PowerShell experience. I installed oh-my-posh and the Paradox theme looked nice. But I saw some empty boxes in random places in my Prompt.
And this is an issue that I face on all the themes. The colors and the design are beautiful and I want to use it but those weird boxes are keeping me from doing that. I would also like to tell that I am using Cascadia Code as my font and also this is the Powerline version of Cascadia Code. So, I think it should work as excepted. Next, trying to fix this, I went to nerdfont.com and I installed Cascadia Code from there as opposed to Microsoft's official GitHub repository. Then I set ConEmu's font to Cascadia which I installed from nerdfonts and this happened:
It's better in a way that I can see the Python symbol and some more symbols but still there is one box that cannot be rendered. But it does get worse if I change repository:
There is a weird question mark after "master". I think I have met all the prerequisites to use oh-my-posh like install posh-git and PSReadLine and having powerline Cascadia Code font and also using ConEmu as they officially suggest. I would absolutely appreciate it a lot if anyone can help me out of this mess and suggest what to do to fix my prompt.
P.S I am using PowerShell 7 Core.
...ANSWER
Answered 2020-Apr-28 at 13:54When you see boxes, that means that the font doesn't have that specified character. e.g. there are a lot of specialized fonts that don't have every character location defined.
Right on the oh-my-posh GitHub page, Quote:
In case you notice weird glyphs after installing a font of choice, make sure the glyphs are available (maybe they have a different location in the font, if so, adjust the correct
$ThemeSettings
icon). If it turns out the character you want is not supported, select a different font.
Also on the oh-my-posh GitHub page, the font used is:
The fonts I use are Powerline fonts, there is a great repository containing them. I use
Meslo LG M Regular
for Powerline Nerd Font
If using Meslo LG M Regular
doesn't solve your problem, then you have to manually remap the icons to the correct unicode locations in your chosen font. Follow the instructions on the GitHub on configuring Theme Settings. e.g.:
QUESTION
I'm on Windows 10 and I have Git for Windows installed. I'm pushing code to two different GitHub accounts, and I'm trying to set up my SSH agent to use two keys (one for each account).
Here's my ~\.ssh\config
:
ANSWER
Answered 2020-Mar-15 at 23:03First, you need ssh-agent only if you have protected those private keys with a passphrase when creating them.
Second, make sure to use the right SSH URL form, referencing those ~/.ssh/config entries:
QUESTION
In my computer at my company, when I press tab after typing something in powershell, it will show a list of suggestion and I can choose item in the list by using arrows key. For example, this is the result when I type "fin" then press tab :
How to config powershell to show that list? I try to copy the powershell profile to my laptop and import neccessary module but it doesn't work like the picture (the shell only show the first thing match what I type, for the above example, it show the Find-Command
when I type fin
and press tab,but not the list)
Here is the profile :
...ANSWER
Answered 2018-Aug-22 at 06:27What you're running in that screenshot isn't just PowerShell. It's ConEmu. So you're probably running ConEmu with the Posh-Git and oh-my-posh and PsReadline modules.
Psreadline provides the menu capability that you're talking about.
Once all the pre-requisites are met and PsReadLine is installed you can modify the key handler if you want so the menu option is assigned to tab. By default it's assigned to Ctrl + Space.
To bind it to tab:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install oh-my-posh
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page