惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

TaoSecurity Blog
TaoSecurity Blog
Jina AI
Jina AI
雷峰网
雷峰网
月光博客
月光博客
The GitHub Blog
The GitHub Blog
WordPress大学
WordPress大学
B
Blog RSS Feed
美团技术团队
C
CXSECURITY Database RSS Feed - CXSecurity.com
小众软件
小众软件
Security Latest
Security Latest
Microsoft Azure Blog
Microsoft Azure Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cybersecurity and Infrastructure Security Agency CISA
Last Week in AI
Last Week in AI
A
Arctic Wolf
Latest news
Latest news
Attack and Defense Labs
Attack and Defense Labs
I
Intezer
F
Fortinet All Blogs
罗磊的独立博客
MongoDB | Blog
MongoDB | Blog
Webroot Blog
Webroot Blog
S
Secure Thoughts
Help Net Security
Help Net Security
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
V
Visual Studio Blog
P
Proofpoint News Feed
博客园 - 【当耐特】
P
Privacy International News Feed
V
Vulnerabilities – Threatpost
Stack Overflow Blog
Stack Overflow Blog
Know Your Adversary
Know Your Adversary
云风的 BLOG
云风的 BLOG
Hacker News: Ask HN
Hacker News: Ask HN
L
LINUX DO - 最新话题
H
Help Net Security
爱范儿
爱范儿
酷 壳 – CoolShell
酷 壳 – CoolShell
S
SegmentFault 最新的问题
Forbes - Security
Forbes - Security
T
Tailwind CSS Blog
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Tenable Blog
Cloudbric
Cloudbric
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Hugging Face - Blog
Hugging Face - Blog

Oh My Posh Blog

Oh My Posh Meets Claude Code: AI-Powered Terminal Prompts Deprecating the bash rprompt What's new #3 What idiot wrote this code? What's new #2
What's new #1
Jan De Dobbeleer · 2022-03-20 · via Oh My Posh Blog

What a week it’s been! Oh My Posh turned 6 years old and we dropped a ton of stuff!

Swag

After seeing Scott Hanselman wear his oh my zsh shirt while we got to talk about Oh My Posh on Windows Wednesdays, I got the sudden urge to expand his wardrobe.

And so, we did. Got in touch with Marc Duiker and we got to work. The result? A ton of new goodies. Consider this to be the first artist series for Oh My Posh, a way to also highlight some talented people in the community. All profits go to the development of the project and artists also get a 20% royalty per item sold. If you know any interesting artists to work with for the next batch, be sure to let me know!

So, what are you waiting for? Get some!

Features

CLI interface

Something I've been sleeping on for a long time, Oh My Posh finally has a new CLI interface. Starting out I had no experience in Go, nor any idea on how to create a proper CLI interface. Over the years the interface grew, but not in a very sustainable way, it was a chain of if statements which was a bit of a pain to support.

You can now interact with Oh My Posh via an interface powered by Cobra. Not only does this bring maintainability and extensibility, it at once introduces a few added features.

Init

If you paid attention to the evolution of the init functionality which automatically supercharges your prompt, you might have noticed I was always trying to make it easier for anyone to get started. When working on the shirts with Marc, it hit me we didn't really have an identifiable prompt as a first time experience. So, as of 7.42.0 Oh My Posh can initialize your prompt without specifying the --config flag. Because we have no way to know how you installed Oh My Posh, and if you have themes installed locally, we download the default theme, cache and use it to get you up and running right there.

When using PowerShell for example, this is all it takes from now on:

oh-my-posh init pwsh | Invoke-Expression

remote config

In case you missed it, as I haven't really done these updates before, you can also use a remote config file nowadays. Also triggered by Scott Hanselman who uses multiple devices but still wants the same, seamless experience everywhere. I'm sure he's not alone 😄.

Export config

While this functionality was already present, you can now also save the current config to a new file in the format of your choice. Combining that with the new initialization above, new users can right away save the default config elsewhere and tweak it to make it their own.

oh-my-posh config export --output=~/.mytheme.omp.json

Edit

Putting things together, all we needed additionally was a way to edit the config.

Almost feels natural right?

RRRRRRR Matey!

Thanks to Jed Willick, who's already been on a roll for a while adding segments to Oh My Posh, we now have a segment for R 🏴‍☠️. Read all about it here.

Bug fixes

Obviously, nothing is perfect. But we aim to be! The following issues have been found and fixed:

  • We now display the right distro name in WSL
  • The poshgit prompt is now disabled when using Oh My Posh
  • Terminal titles are stripped from ANSI escape sequences, otherwise they are not displayed correctly
  • The config file now also works with the .yml extension and not only .yaml

That's it for this week, I'll try to keep this up 🤞🏻.

Keep that prompt posh everyone!