Comments (6)
@Bilge it's the destination that matters, not the journey. Or something like that. Who knows.
from oh-my-posh.
@Bilge as we rely on a third party parser, I'm going to see if we can solve this, or if they have a bug. Thanks for reporting this one.
from oh-my-posh.
@Bilge this is an annoying one. I understand the request and I can fix it by adjusting the parser BUT, it's going against the YAML spec this way. The parser has no way to quote all strings, it decides based on the content which could imply that the following JSON export:
{ "key": "~" }
can originate from the following YAML:
key: ~
and be entirely correct.
So, I will hack this in for oh-my-posh specifically, but it's a project specific hack.
from oh-my-posh.
Incorrect. The following YAML:
key: ~
Is equivalent to the following JSON:
{"key": null}
This is documented in the YAML parser spec I previously linked. So no, this is not a project-specific hack, it's correctly interpreting the spec for any use. In particular:
null | Null | NULL | ~ tag:yaml.org,2002:null
Note that the ~
is listed as a valid representation of null.
from oh-my-posh.
@Bilge so, from JSON, and any other model that doesn't have a magical notation for ~
, it needs to always parse to "~"
. In that case my hack is actually a fix.
from oh-my-posh.
Yes, you arrived at the good solution, just possibly for the wrong reasons. 🤷🏻♂️
from oh-my-posh.
Related Issues (20)
- VS Code Terminal (PowerShell) command undeletable extra first letter HOT 2
- root path directory with global git hooks are detected as git repo HOT 4
- Double `/` in the Path segment HOT 5
- Formatting of Configuration - Block
- Init is Extremely Slow HOT 1
- CONFIG ERROR when specifying default config file HOT 4
- Disable oh-my-posh if it detects that it is not running with a TTY HOT 7
- Optionally silence autoupgrade output HOT 2
- Config Error when trying to apply theme HOT 1
- Upgrade Fails HOT 8
- Auto_upgrade Linux non-root permission denied HOT 1
- Show current mode in ZSH Vi mode
- Unknown battery state
- More fine-grained controls over color cycle
- Set default `parse_kubeconfig` property within Kubernetes segment to `true` HOT 1
- Time segments fails to display in WSL with Ubuntu HOT 3
- An exception occurs when a multi-line command is very long HOT 1
- Posh-Git git add tab file completion is broken HOT 6
- Auto-upgrade instructions need direction HOT 6
- home_enabled: true not working HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oh-my-posh.