feat: remove enable_hyperlink

This commit is contained in:
Jan De Dobbeleer 2022-01-23 18:48:55 +01:00 committed by Jan De Dobbeleer
parent b816a0bf70
commit f5178e8c8c
37 changed files with 45 additions and 225 deletions

View file

@ -50,8 +50,7 @@ sidebar_label: Sample
"style": "folder", "style": "folder",
"exclude_folders": [ "exclude_folders": [
"/super/secret/project" "/super/secret/project"
], ]
"enable_hyperlink": false
} }
}, },
{ {

View file

@ -27,7 +27,6 @@ The free tier for *Current weather and forecasts collection* is sufficient.
"apikey": "<YOUR_API_KEY>", "apikey": "<YOUR_API_KEY>",
"location": "AMSTERDAM,NL", "location": "AMSTERDAM,NL",
"units": "metric", "units": "metric",
"enable_hyperlink" : false,
"http_timeout": 20, "http_timeout": 20,
"cache_timeout": 10, "cache_timeout": 10,
"template": "{{.Weather}} ({{.Temperature}}{{.UnitIcon}})" "template": "{{.Weather}} ({{.Temperature}}{{.UnitIcon}})"
@ -43,7 +42,6 @@ The free tier for *Current weather and forecasts collection* is sufficient.
Please, refer to ISO 3166 for the state codes or country codes - defaults to `DE BILT,NL` Please, refer to ISO 3166 for the state codes or country codes - defaults to `DE BILT,NL`
- units: `string` - Units of measurement. - units: `string` - Units of measurement.
Available values are standard (kelvin), metric (celsius), and imperial (fahrenheit) - defaults to `standard` Available values are standard (kelvin), metric (celsius), and imperial (fahrenheit) - defaults to `standard`
- enable_hyperlink: `bool` - Displays an hyperlink to get openweathermap data
- http_timeout: `int` - The default timeout for http request is 20ms. - http_timeout: `int` - The default timeout for http request is 20ms.
- cache_timeout: `int` - The default timeout for request caching is 10m. A value of 0 disables the cache. - cache_timeout: `int` - The default timeout for request caching is 10m. A value of 0 disables the cache.
- template: `string` - A go [text/template][go-text-template] template extended with [sprig][sprig] utilizing the - template: `string` - A go [text/template][go-text-template] template extended with [sprig][sprig] utilizing the

View file

@ -33,8 +33,6 @@ Display the current path.
- folder_icon: `string` - the icon to use as a folder indication - defaults to `..` - folder_icon: `string` - the icon to use as a folder indication - defaults to `..`
- windows_registry_icon: `string` - the icon to display when in the Windows registry - defaults to `\uE0B1` - windows_registry_icon: `string` - the icon to display when in the Windows registry - defaults to `\uE0B1`
- style: `enum` - how to display the current path - style: `enum` - how to display the current path
- enable_hyperlink: `boolean` - displays an hyperlink for the path - defaults to `false`
- mixed_threshold: `number` - the maximum length of a path segment that will be displayed when using `Mixed` - - mixed_threshold: `number` - the maximum length of a path segment that will be displayed when using `Mixed` -
defaults to `4` defaults to `4`
- max_depth: `number` - maximum path depth to display before shortening when using `Agnoster Short` - defaults to `1` - max_depth: `number` - maximum path depth to display before shortening when using `Agnoster Short` - defaults to `1`

View file

@ -19,7 +19,6 @@ Display the currently active php version.
"background": "#4063D8", "background": "#4063D8",
"properties": { "properties": {
"prefix": " \ue73d ", "prefix": " \ue73d ",
"enable_hyperlink": false
} }
} }
``` ```
@ -33,7 +32,6 @@ Display the currently active php version.
- display_mode: `string` - determines when the segment is displayed - display_mode: `string` - determines when the segment is displayed
- `always`: the segment is always displayed - `always`: the segment is always displayed
- `files`: the segment is only displayed when `*.php, composer.json, composer.lock, .php-version` files are present (default) - `files`: the segment is only displayed when `*.php, composer.json, composer.lock, .php-version` files are present (default)
- enable_hyperlink: `bool` - display an hyperlink to the php release notes - defaults to `false`
## [Template][templates] Properties ## [Template][templates] Properties

View file

@ -68,7 +68,6 @@ if that color is visible against any of your backgrounds.
- SkiingIcon - defaults to `\ue213` - SkiingIcon - defaults to `\ue213`
- WorkOutIcon - defaults to `\ue213` - WorkOutIcon - defaults to `\ue213`
- UnknownActivityIcon - defaults to `\ue213` - UnknownActivityIcon - defaults to `\ue213`
- enable_hyperlink - display an hyperlink to activities - defaults to `false`
## [Template][templates] Properties ## [Template][templates] Properties

View file

@ -39,8 +39,6 @@ type TransientPrompt struct {
} }
const ( const (
// EnableHyperlink enable hyperlink
EnableHyperlink Property = "enable_hyperlink"
// HTTPTimeout timeout used when executing http request // HTTPTimeout timeout used when executing http request
HTTPTimeout Property = "http_timeout" HTTPTimeout Property = "http_timeout"
// DefaultHTTPTimeout default timeout used when executing http request // DefaultHTTPTimeout default timeout used when executing http request

View file

@ -48,7 +48,7 @@ func (a *angular) init(props Properties, env Environment) {
}, },
}, },
}, },
versionURLTemplate: "[%s](https://github.com/angular/angular/releases/tag/%s.%s.%s)", versionURLTemplate: "https://github.com/angular/angular/releases/tag/{{.Full}}",
} }
} }

View file

@ -24,7 +24,7 @@ func (c *crystal) init(props Properties, env Environment) {
regex: `Crystal (?P<version>((?P<major>[0-9]+).(?P<minor>[0-9]+).(?P<patch>[0-9]+)))`, regex: `Crystal (?P<version>((?P<major>[0-9]+).(?P<minor>[0-9]+).(?P<patch>[0-9]+)))`,
}, },
}, },
versionURLTemplate: "[%s](https://github.com/crystal-lang/crystal/releases/tag/%s.%s.%s)", versionURLTemplate: "https://github.com/crystal-lang/crystal/releases/tag/{{ .Full }}",
} }
} }

View file

@ -24,7 +24,7 @@ func (d *dart) init(props Properties, env Environment) {
regex: `Dart SDK version: (?P<version>((?P<major>[0-9]+).(?P<minor>[0-9]+).(?P<patch>[0-9]+)))`, regex: `Dart SDK version: (?P<version>((?P<major>[0-9]+).(?P<minor>[0-9]+).(?P<patch>[0-9]+)))`,
}, },
}, },
versionURLTemplate: "[%s](https://dart.dev/guides/language/evolution#dart-%s%s)", versionURLTemplate: "https://dart.dev/guides/language/evolution#dart-{{ .Major }}{{ .Minor }}",
} }
} }

View file

@ -353,25 +353,6 @@ func (l *language) string() string {
return err.Error() return err.Error()
} }
if l.props.getBool(EnableHyperlink, false) {
versionURLTemplate := l.props.getString(VersionURLTemplate, "")
// backward compatibility
if versionURLTemplate == "" {
text = l.buildVersionURL(text)
} else {
template := &textTemplate{
Template: versionURLTemplate,
Context: l.version,
Env: l.env,
}
url, err := template.render()
if err != nil {
return err.Error()
}
text = url
}
}
if l.props.getBool(EnableVersionMismatch, false) { if l.props.getBool(EnableVersionMismatch, false) {
l.setVersionFileMismatch() l.setVersionFileMismatch()
} }

View file

@ -30,7 +30,7 @@ func (d *dotnet) init(props Properties, env Environment) {
`(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?))`, `(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?))`,
}, },
}, },
versionURLTemplate: "[%1s](https://github.com/dotnet/core/blob/master/release-notes/%[2]s.%[3]s/%[2]s.%[3]s.%[4]s/%[2]s.%[3]s.%[4]s.md)", versionURLTemplate: "https://github.com/dotnet/core/blob/master/release-notes/{{ .Major }}.{{ .Minor }}/{{ .Major }}.{{ .Minor }}.{{ .Patch }}/{{ .Major }}.{{ .Minor }}.{{ .Patch }}.md)", // nolint: lll
} }
} }

View file

@ -36,7 +36,7 @@ func (g *golang) init(props Properties, env Environment) {
regex: `(?:go(?P<version>((?P<major>[0-9]+).(?P<minor>[0-9]+)(.(?P<patch>[0-9]+))?)))`, regex: `(?:go(?P<version>((?P<major>[0-9]+).(?P<minor>[0-9]+)(.(?P<patch>[0-9]+))?)))`,
}, },
}, },
versionURLTemplate: "[%s](https://golang.org/doc/go%s.%s)", versionURLTemplate: "https://golang.org/doc/go{{ .Major }}.{{ .Minor }})",
} }
} }

View file

@ -24,7 +24,7 @@ func (j *julia) init(props Properties, env Environment) {
regex: `julia version (?P<version>((?P<major>[0-9]+).(?P<minor>[0-9]+).(?P<patch>[0-9]+)))`, regex: `julia version (?P<version>((?P<major>[0-9]+).(?P<minor>[0-9]+).(?P<patch>[0-9]+)))`,
}, },
}, },
versionURLTemplate: "[%s](https://github.com/JuliaLang/julia/releases/tag/v%s.%s.%s)", versionURLTemplate: "https://github.com/JuliaLang/julia/releases/tag/v{{ .Full }})",
} }
} }

View file

@ -3,7 +3,6 @@ package main
import ( import (
"errors" "errors"
"fmt" "fmt"
"strings"
) )
type loadContext func() type loadContext func()
@ -20,6 +19,7 @@ type version struct {
Patch string Patch string
Prerelease string Prerelease string
BuildMetadata string BuildMetadata string
URL string
} }
type cmd struct { type cmd struct {
@ -93,25 +93,6 @@ func (l *language) renderTemplate(segmentTemplate string, context SegmentWriter)
if err != nil { if err != nil {
return err.Error() return err.Error()
} }
// TODO: this needs to be removed or refactored
if !l.props.getBool(EnableHyperlink, false) {
return text
}
versionURLTemplate := l.props.getString(VersionURLTemplate, "")
// backward compatibility
if versionURLTemplate == "" {
return l.buildVersionURL(text)
}
template = &textTemplate{
Template: versionURLTemplate,
Context: l.version,
Env: l.env,
}
text, err = template.render()
if err != nil {
return err.Error()
}
return text return text
} }
@ -196,6 +177,7 @@ func (l *language) setVersion() error {
return fmt.Errorf("err parsing info from %s with %s", command.executable, versionStr) return fmt.Errorf("err parsing info from %s with %s", command.executable, versionStr)
} }
l.version = *version l.version = *version
l.buildVersionURL()
return nil return nil
} }
return errors.New(l.props.getString(MissingCommandText, "")) return errors.New(l.props.getString(MissingCommandText, ""))
@ -226,27 +208,19 @@ func (l *language) setVersionFileMismatch() {
l.colorMismatch() l.colorMismatch()
} }
func (l *language) buildVersionURL(text string) string { func (l *language) buildVersionURL() {
if l.versionURLTemplate == "" { versionURLTemplate := l.props.getString(VersionURLTemplate, l.versionURLTemplate)
return text if len(versionURLTemplate) == 0 {
return
} }
truncatingSprintf := func(str string, args ...interface{}) (string, error) { template := &textTemplate{
n := strings.Count(str, "%s") Template: versionURLTemplate,
if n > len(args) { Context: l.version,
return "", errors.New("Too many parameters") Env: l.env,
} }
if n == 0 { url, err := template.render()
return fmt.Sprintf(str, args...), nil
}
arguments := make([]interface{}, 0, n)
for i := 0; i < n; i++ {
arguments = append(arguments, args[i])
}
return fmt.Sprintf(str, arguments...), nil
}
version, err := truncatingSprintf(l.versionURLTemplate, text, l.version.Major, l.version.Minor, l.version.Patch)
if err != nil { if err != nil {
return text return
} }
return version l.version.URL = url
} }

View file

@ -353,9 +353,6 @@ func TestLanguageEnabledCommandExitCode(t *testing.T) {
} }
func TestLanguageHyperlinkEnabled(t *testing.T) { func TestLanguageHyperlinkEnabled(t *testing.T) {
props := properties{
EnableHyperlink: true,
}
args := &languageArgs{ args := &languageArgs{
commands: []*cmd{ commands: []*cmd{
{ {
@ -369,22 +366,19 @@ func TestLanguageHyperlinkEnabled(t *testing.T) {
regex: `(?P<version>((?P<major>[0-9]+).(?P<minor>[0-9]+).(?P<patch>[0-9]+)))`, regex: `(?P<version>((?P<major>[0-9]+).(?P<minor>[0-9]+).(?P<patch>[0-9]+)))`,
}, },
}, },
versionURLTemplate: "[%s](https://unicor.org/doc/%s.%s.%s)", versionURLTemplate: "https://unicor.org/doc/{{ .Full }}",
extensions: []string{uni, corn}, extensions: []string{uni, corn},
enabledExtensions: []string{corn}, enabledExtensions: []string{corn},
enabledCommands: []string{"corn"}, enabledCommands: []string{"corn"},
version: universion, version: universion,
properties: props, properties: properties{},
} }
lang := bootStrapLanguageTest(args) lang := bootStrapLanguageTest(args)
assert.True(t, lang.enabled()) assert.True(t, lang.enabled())
assert.Equal(t, "[1.3.307](https://unicor.org/doc/1.3.307)", lang.string()) assert.Equal(t, "https://unicor.org/doc/1.3.307", lang.version.URL)
} }
func TestLanguageHyperlinkEnabledWrongRegex(t *testing.T) { func TestLanguageHyperlinkEnabledWrongRegex(t *testing.T) {
props := properties{
EnableHyperlink: true,
}
args := &languageArgs{ args := &languageArgs{
commands: []*cmd{ commands: []*cmd{
{ {
@ -398,47 +392,18 @@ func TestLanguageHyperlinkEnabledWrongRegex(t *testing.T) {
regex: `wrong`, regex: `wrong`,
}, },
}, },
versionURLTemplate: "[%s](https://unicor.org/doc/%s.%s.%s)", versionURLTemplate: "https://unicor.org/doc/{{ .Full }}",
extensions: []string{uni, corn}, extensions: []string{uni, corn},
enabledExtensions: []string{corn}, enabledExtensions: []string{corn},
enabledCommands: []string{"corn"}, enabledCommands: []string{"corn"},
version: universion, version: universion,
properties: props, properties: properties{},
} }
lang := bootStrapLanguageTest(args) lang := bootStrapLanguageTest(args)
assert.True(t, lang.enabled()) assert.True(t, lang.enabled())
assert.Equal(t, "err parsing info from corn with 1.3.307", lang.string()) assert.Equal(t, "err parsing info from corn with 1.3.307", lang.string())
} }
func TestLanguageHyperlinkEnabledLessParamInTemplate(t *testing.T) {
props := properties{
EnableHyperlink: true,
}
args := &languageArgs{
commands: []*cmd{
{
executable: "uni",
args: []string{"--version"},
regex: `(?P<version>((?P<major>[0-9]+).(?P<minor>[0-9]+).(?P<patch>[0-9]+)))`,
},
{
executable: "corn",
args: []string{"--version"},
regex: `(?P<version>((?P<major>[0-9]+).(?P<minor>[0-9]+).(?P<patch>[0-9]+)))`,
},
},
versionURLTemplate: "[%s](https://unicor.org/doc/%s)",
extensions: []string{uni, corn},
enabledExtensions: []string{corn},
enabledCommands: []string{"corn"},
version: universion,
properties: props,
}
lang := bootStrapLanguageTest(args)
assert.True(t, lang.enabled())
assert.Equal(t, "[1.3.307](https://unicor.org/doc/1)", lang.string())
}
func TestLanguageEnabledInHome(t *testing.T) { func TestLanguageEnabledInHome(t *testing.T) {
cases := []struct { cases := []struct {
Case string Case string
@ -471,32 +436,3 @@ func TestLanguageEnabledInHome(t *testing.T) {
assert.Equal(t, tc.ExpectedEnabled, lang.enabled(), tc.Case) assert.Equal(t, tc.ExpectedEnabled, lang.enabled(), tc.Case)
} }
} }
func TestLanguageHyperlinkEnabledMoreParamInTemplate(t *testing.T) {
props := properties{
EnableHyperlink: true,
}
args := &languageArgs{
commands: []*cmd{
{
executable: "uni",
args: []string{"--version"},
regex: `(?P<version>((?P<major>[0-9]+).(?P<minor>[0-9]+).(?P<patch>[0-9]+)))`,
},
{
executable: "corn",
args: []string{"--version"},
regex: `(?P<version>((?P<major>[0-9]+).(?P<minor>[0-9]+).(?P<patch>[0-9]+)))`,
},
},
versionURLTemplate: "[%s](https://unicor.org/doc/%s.%s.%s.%s)",
extensions: []string{uni, corn},
enabledExtensions: []string{corn},
enabledCommands: []string{"corn"},
version: universion,
properties: props,
}
lang := bootStrapLanguageTest(args)
assert.True(t, lang.enabled())
assert.Equal(t, "1.3.307", lang.string())
}

View file

@ -218,7 +218,6 @@ func TestOWMSegmentIcons(t *testing.T) {
Location: "AMSTERDAM,NL", Location: "AMSTERDAM,NL",
Units: "metric", Units: "metric",
CacheTimeout: 0, CacheTimeout: 0,
EnableHyperlink: true,
SegmentTemplate: "[{{.Weather}} ({{.Temperature}}{{.UnitIcon}})]({{.URL}})", SegmentTemplate: "[{{.Weather}} ({{.Temperature}}{{.UnitIcon}})]({{.URL}})",
}, },
env: env, env: env,
@ -264,7 +263,6 @@ func TestOWMSegmentFromCacheWithHyperlink(t *testing.T) {
APIKey: "key", APIKey: "key",
Location: "AMSTERDAM,NL", Location: "AMSTERDAM,NL",
Units: "metric", Units: "metric",
EnableHyperlink: true,
SegmentTemplate: "[{{.Weather}} ({{.Temperature}}{{.UnitIcon}})]({{.URL}})", SegmentTemplate: "[{{.Weather}} ({{.Temperature}}{{.UnitIcon}})]({{.URL}})",
}, },
env: env, env: env,

View file

@ -14,6 +14,7 @@ type path struct {
pwd string pwd string
Path string Path string
StackCount int StackCount int
Location string
} }
const ( const (
@ -79,12 +80,10 @@ func (pt *path) enabled() bool {
pt.Path = fmt.Sprintf("Path style: %s is not available", style) pt.Path = fmt.Sprintf("Path style: %s is not available", style)
} }
pt.Path = pt.formatWindowsDrive(pt.Path) pt.Path = pt.formatWindowsDrive(pt.Path)
if pt.props.getBool(EnableHyperlink, false) {
// wsl check
if pt.env.isWsl() { if pt.env.isWsl() {
pt.pwd, _ = pt.env.runCommand("wslpath", "-m", pt.pwd) pt.Location, _ = pt.env.runCommand("wslpath", "-m", pt.pwd)
} } else {
pt.Path = fmt.Sprintf("[%s](file://%s)", pt.Path, pt.pwd) pt.Location = pt.pwd
} }
pt.StackCount = pt.env.stackCount() pt.StackCount = pt.env.stackCount()

View file

@ -429,6 +429,7 @@ func TestAgnosterPathStyles(t *testing.T) {
env.On("pwd").Return(tc.Pwd) env.On("pwd").Return(tc.Pwd)
env.On("getRuntimeGOOS").Return(tc.GOOS) env.On("getRuntimeGOOS").Return(tc.GOOS)
env.On("stackCount").Return(0) env.On("stackCount").Return(0)
env.On("isWsl").Return(false)
args := &args{ args := &args{
PSWD: &tc.Pswd, PSWD: &tc.Pswd,
} }
@ -551,6 +552,7 @@ func TestGetFullPath(t *testing.T) {
env.On("pwd").Return(tc.Pwd) env.On("pwd").Return(tc.Pwd)
env.On("getRuntimeGOOS").Return(tc.GOOS) env.On("getRuntimeGOOS").Return(tc.GOOS)
env.On("stackCount").Return(tc.StackCount) env.On("stackCount").Return(tc.StackCount)
env.On("isWsl").Return(false)
args := &args{ args := &args{
PSWD: &tc.Pswd, PSWD: &tc.Pswd,
} }

View file

@ -20,6 +20,7 @@ type strava struct {
Hours int Hours int
Authenticate bool Authenticate bool
Error string Error string
URL string
} }
const ( const (
@ -130,9 +131,7 @@ func (s *strava) string() string {
if err != nil { if err != nil {
return err.Error() return err.Error()
} }
if s.props.getBool(EnableHyperlink, false) { s.URL = fmt.Sprintf("https://www.strava.com/activities/%d", s.ID)
text = fmt.Sprintf("[%s](https://www.strava.com/activities/%d)", text, s.ID)
}
return text return text
} }

View file

@ -40,8 +40,7 @@
"home_icon": "", "home_icon": "",
"folder_icon": " \uf07b ", "folder_icon": " \uf07b ",
"style": "folder", "style": "folder",
"prefix": " \uf07b\uf553", "prefix": " \uf07b\uf553"
"enable_hyperlink": true
} }
}, },
{ {

View file

@ -22,9 +22,7 @@
"foreground": "#ff5555", "foreground": "#ff5555",
"properties": { "properties": {
"prefix": "<#ffffff>[</>", "prefix": "<#ffffff>[</>",
"postfix": "<#ffffff>]</>", "postfix": "<#ffffff>]</>"
"style": "folder",
"enable_hyperlink": true
} }
}, },
{ {

View file

@ -141,9 +141,7 @@
"properties": { "properties": {
"folder_separator_icon": " \uf554 ", "folder_separator_icon": " \uf554 ",
"home_icon": "\uf7db ", "home_icon": "\uf7db ",
"folder_icon": "\uf07b ", "folder_icon": "\uf07b "
"style": "agnoster_full",
"enable_hyperlink": true
} }
} }
] ]

View file

@ -109,7 +109,6 @@
"properties": { "properties": {
"prefix": "<#000000> \ue5ff </>", "prefix": "<#000000> \ue5ff </>",
"style": "agnoster_short", "style": "agnoster_short",
"enable_hyperlink": true,
"home_icon": "\uF7DB ", "home_icon": "\uF7DB ",
"folder_icon": "<#000000>\ue5fe </>", "folder_icon": "<#000000>\ue5fe </>",
"folder_separator_icon": "<#000000>\uE0B1 </>" "folder_separator_icon": "<#000000>\uE0B1 </>"

View file

@ -58,8 +58,7 @@
"properties": { "properties": {
"style": "mixed", "style": "mixed",
"home_icon": "\uf7dd ", "home_icon": "\uf7dd ",
"prefix": "", "prefix": ""
"enable_hyperlink": true
} }
}, },
{ {

View file

@ -45,9 +45,7 @@
"foreground": "#fffef9", "foreground": "#fffef9",
"background": "#C678DD", "background": "#C678DD",
"properties": { "properties": {
"style": "full", "style": "full"
"prefix": "",
"enable_hyperlink": false
} }
}, },
{ {

View file

@ -58,7 +58,6 @@
"folder_separator_icon": "/", "folder_separator_icon": "/",
"prefix": " \uE5FE ", "prefix": " \uE5FE ",
"home_icon": "~", "home_icon": "~",
"enable_hyperlink": true,
"max_depth": 2 "max_depth": 2
} }
}, },

View file

@ -49,8 +49,7 @@
"folder_separator_icon": " <#011627>\uE0B1</> ", "folder_separator_icon": " <#011627>\uE0B1</> ",
"home_icon": "\uf7db ", "home_icon": "\uf7db ",
"folder_icon": "\uf07c ", "folder_icon": "\uf07c ",
"style": "agnoster", "style": "agnoster"
"enable_hyperlink": true
} }
}, },
{ {

View file

@ -37,7 +37,6 @@
"folder_separator_icon": "\ue0b9", "folder_separator_icon": "\ue0b9",
"mixed_threshold": 8, "mixed_threshold": 8,
"style": "mixed", "style": "mixed",
"enable_hyperlink": true,
"mapped_locations": { "mapped_locations": {
"C:\\Users": "\uf007", "C:\\Users": "\uf007",
"C:\\Windows": "\ue62a" "C:\\Windows": "\ue62a"

View file

@ -103,7 +103,6 @@
"properties": { "properties": {
"prefix": "<#f2f200> \ue5ff </>", "prefix": "<#f2f200> \ue5ff </>",
"style": "agnoster_short", "style": "agnoster_short",
"enable_hyperlink": true,
"home_icon": "\uF7DB ", "home_icon": "\uF7DB ",
"folder_icon": "<#B5B2C2>\ue5fe </>", "folder_icon": "<#B5B2C2>\ue5fe </>",
"folder_separator_icon": "<#ffea00>\uE0B1 </>" "folder_separator_icon": "<#ffea00>\uE0B1 </>"

View file

@ -39,12 +39,6 @@
"description": "Fetch the version number", "description": "Fetch the version number",
"default": true "default": true
}, },
"enable_hyperlink": {
"type": "boolean",
"title": "Enable hyperlink",
"description": "Displays an hyperlink for the current segment",
"default": false
},
"http_timeout": { "http_timeout": {
"type": "integer", "type": "integer",
"title": "Http request timeout", "title": "Http request timeout",
@ -407,9 +401,6 @@
}, },
"missing_command_text": { "missing_command_text": {
"$ref": "#/definitions/missing_command_text" "$ref": "#/definitions/missing_command_text"
},
"enable_hyperlink": {
"$ref": "#/definitions/enable_hyperlink"
} }
} }
} }
@ -614,9 +605,6 @@
}, },
"missing_command_text": { "missing_command_text": {
"$ref": "#/definitions/missing_command_text" "$ref": "#/definitions/missing_command_text"
},
"enable_hyperlink": {
"$ref": "#/definitions/enable_hyperlink"
} }
} }
} }
@ -643,9 +631,6 @@
}, },
"missing_command_text": { "missing_command_text": {
"$ref": "#/definitions/missing_command_text" "$ref": "#/definitions/missing_command_text"
},
"enable_hyperlink": {
"$ref": "#/definitions/enable_hyperlink"
} }
} }
} }
@ -672,9 +657,6 @@
}, },
"missing_command_text": { "missing_command_text": {
"$ref": "#/definitions/missing_command_text" "$ref": "#/definitions/missing_command_text"
},
"enable_hyperlink": {
"$ref": "#/definitions/enable_hyperlink"
} }
} }
} }
@ -701,9 +683,6 @@
}, },
"missing_command_text": { "missing_command_text": {
"$ref": "#/definitions/missing_command_text" "$ref": "#/definitions/missing_command_text"
},
"enable_hyperlink": {
"$ref": "#/definitions/enable_hyperlink"
} }
} }
} }
@ -730,9 +709,6 @@
}, },
"missing_command_text": { "missing_command_text": {
"$ref": "#/definitions/missing_command_text" "$ref": "#/definitions/missing_command_text"
},
"enable_hyperlink": {
"$ref": "#/definitions/enable_hyperlink"
} }
} }
} }
@ -907,9 +883,6 @@
"title": "NPM Icon", "title": "NPM Icon",
"description": "Icon/text to use for NPM", "description": "Icon/text to use for NPM",
"default": " \uE71E" "default": " \uE71E"
},
"enable_hyperlink": {
"$ref": "#/definitions/enable_hyperlink"
} }
} }
} }
@ -1167,9 +1140,6 @@
"title": "Enable the Mapped Locations feature", "title": "Enable the Mapped Locations feature",
"description": "Replace known locations in the path with the replacements before applying the style.", "description": "Replace known locations in the path with the replacements before applying the style.",
"default": true "default": true
},
"enable_hyperlink": {
"$ref": "#/definitions/enable_hyperlink"
} }
} }
} }
@ -1199,9 +1169,6 @@
}, },
"missing_command_text": { "missing_command_text": {
"$ref": "#/definitions/missing_command_text" "$ref": "#/definitions/missing_command_text"
},
"enable_hyperlink": {
"$ref": "#/definitions/enable_hyperlink"
} }
} }
} }
@ -1444,9 +1411,6 @@
"default": "standard", "default": "standard",
"enum": ["standard", "metric", "imperial"] "enum": ["standard", "metric", "imperial"]
}, },
"enable_hyperlink": {
"$ref": "#/definitions/enable_hyperlink"
},
"http_timeout": { "http_timeout": {
"$ref": "#/definitions/http_timeout" "$ref": "#/definitions/http_timeout"
}, },
@ -1595,9 +1559,6 @@
"title": "cache timeout", "title": "cache timeout",
"description": "The number of minutes the response is cached. A value of 0 disables the cache.", "description": "The number of minutes the response is cached. A value of 0 disables the cache.",
"default": 10 "default": 10
},
"enable_hyperlink": {
"$ref": "#/definitions/enable_hyperlink"
} }
} }
} }

View file

@ -63,7 +63,6 @@
"properties": { "properties": {
"prefix": "<#f2f200> \ue5ff </>", "prefix": "<#f2f200> \ue5ff </>",
"style": "agnoster_short", "style": "agnoster_short",
"enable_hyperlink": true,
"home_icon": "\uf015", "home_icon": "\uf015",
"folder_icon": "<#B5B2C2>\ue5fe </>", "folder_icon": "<#B5B2C2>\ue5fe </>",
"folder_separator_icon": "<#B5B2C2>\ue0bf </>" "folder_separator_icon": "<#B5B2C2>\ue0bf </>"

View file

@ -63,7 +63,6 @@
"properties": { "properties": {
"prefix": "<#f2f200> \ue5ff </>", "prefix": "<#f2f200> \ue5ff </>",
"style": "full", "style": "full",
"enable_hyperlink": false,
"folder_icon": "<#B5B2C2>\ue5fe </>" "folder_icon": "<#B5B2C2>\ue5fe </>"
} }
}, },

View file

@ -24,8 +24,7 @@
"home_icon": "\u2764", "home_icon": "\u2764",
"folder_separator_icon": " 🢖 ", "folder_separator_icon": " 🢖 ",
"prefix": "<#eaeaea>⎧</> ⟨", "prefix": "<#eaeaea>⎧</> ⟨",
"postfix": "⟩ ", "postfix": "⟩ "
"enable_hyperlink": false
} }
}, },
{ {

View file

@ -50,8 +50,7 @@
"home_icon": "\uF7DB", "home_icon": "\uF7DB",
"folder_icon": "\ue5fe", "folder_icon": "\ue5fe",
"folder_separator_icon": "<transparent> \uE0BD </>", "folder_separator_icon": "<transparent> \uE0BD </>",
"style": "agnoster_short", "style": "agnoster_short"
"enable_hyperlink": true
} }
}, },
{ {

View file

@ -50,8 +50,7 @@
"home_icon": "\uF7DB", "home_icon": "\uF7DB",
"folder_icon": "\ue5fe", "folder_icon": "\ue5fe",
"folder_separator_icon": "<transparent> \uE0BD </>", "folder_separator_icon": "<transparent> \uE0BD </>",
"style": "agnoster_short", "style": "agnoster_short"
"enable_hyperlink": true
} }
}, },
{ {

View file

@ -58,8 +58,7 @@
"foreground": "#100e23", "foreground": "#100e23",
"background": "#91ddff", "background": "#91ddff",
"properties": { "properties": {
"style": "folder", "style": "folder"
"enable_hyperlink": false
} }
}, },
{ {

View file

@ -30,8 +30,7 @@
"background": "#0080ff", "background": "#0080ff",
"properties": { "properties": {
"prefix": " \uE5FF ", "prefix": " \uE5FF ",
"style": "full", "style": "full"
"enable_hyperlink": true
} }
}, },
{ {