mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
New segment for .NET SDK version (or unsupported version) display. Includes update for handling command execution errors so segments can act differently based on exit codes. Using a custom error type to make it testable rather than passing the OS error directly to the segment.
32 lines
712 B
Markdown
32 lines
712 B
Markdown
---
|
|
id: dotnet
|
|
title: Dotnet
|
|
sidebar_label: Dotnet
|
|
---
|
|
|
|
## What
|
|
|
|
Display the currently active .NET SDK version.
|
|
|
|
## Sample Configuration
|
|
|
|
```json
|
|
{
|
|
"type": "dotnet",
|
|
"style": "powerline",
|
|
"powerline_symbol": "",
|
|
"foreground": "#000000",
|
|
"background": "#00ffff",
|
|
"properties": {
|
|
"prefix": " \uE77F "
|
|
}
|
|
}
|
|
```
|
|
|
|
## Properties
|
|
|
|
- display_version: `boolean` - display the active version or not; useful if all you need is an icon indicating `dotnet`
|
|
is present - defaults to `true`
|
|
- unsupported_version_icon: `string` - text/icon that is displayed when the active .NET SDK version (e.g., one specified
|
|
by `global.json`) is not installed/supported - defaults to `\u2327` (X in a rectangle box)
|