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

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
Help Net Security
Help Net Security
P
Privacy International News Feed
T
Threat Research - Cisco Blogs
C
Cisco Blogs
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
L
LINUX DO - 热门话题
Security Latest
Security Latest
A
Arctic Wolf
G
GRAHAM CLULEY
月光博客
月光博客
S
Securelist
D
Docker
J
Java Code Geeks
T
Troy Hunt's Blog
T
Tenable Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
SecWiki News
SecWiki News
S
Security @ Cisco Blogs
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
LINUX DO - 最新话题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
aimingoo的专栏
aimingoo的专栏
博客园 - 【当耐特】
H
Heimdal Security Blog
The Hacker News
The Hacker News
博客园 - 三生石上(FineUI控件)
Application and Cybersecurity Blog
Application and Cybersecurity Blog
N
Netflix TechBlog - Medium
Vercel News
Vercel News
Forbes - Security
Forbes - Security
B
Blog RSS Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
B
Blog
MongoDB | Blog
MongoDB | Blog
博客园 - 聂微东
Google DeepMind News
Google DeepMind News
S
Secure Thoughts
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Check Point Blog
云风的 BLOG
云风的 BLOG
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Blog of Author Tim Ferriss
L
Lohrmann on Cybersecurity
F
Full Disclosure
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Proofpoint News Feed

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!