diff --git a/src/prompt/engine.go b/src/prompt/engine.go index 532ac75b..20d8c2e8 100644 --- a/src/prompt/engine.go +++ b/src/prompt/engine.go @@ -154,6 +154,7 @@ func (e *Engine) shouldFill(filler string, padLength int) (string, bool) { } // allow for easy color overrides and templates + terminal.SetColors("default", "default") terminal.Write("", "", filler) filler, lenFiller := terminal.String() if lenFiller == 0 { diff --git a/themes/schema.json b/themes/schema.json index ee5e3f43..36b17016 100644 --- a/themes/schema.json +++ b/themes/schema.json @@ -147,6 +147,11 @@ "description": "The duration for which the segment will be cached. This is parsed using the `time.ParseDuration` function from the Go standard library (see https://pkg.go.dev/time#ParseDuration for details).", "pattern": "^(infinite|([0-9]+(h|m|s))+)$" }, + "filler": { + "type": "string", + "title": "Filler", + "description": "Right aligned filler text, will span the remaining width." + }, "extra_prompt": { "type": "object", "default": {}, @@ -230,6 +235,10 @@ "hide" ], "default": "" + }, + "filler": { + "$ref": "#/definitions/filler", + "description": "https://ohmyposh.dev/docs/configuration/block#filler" } } } @@ -4787,19 +4796,21 @@ "$ref": "#/definitions/extra_prompt", "title": "Transient Prompt Setting", "description": "https://ohmyposh.dev/docs/configuration/transient", - "properties": { - "filler": { - "type": "string", - "title": "Filler", - "description": "Right aligned filler text, will span the remaining width" - }, - "newline": { - "type": "boolean", - "title": "Newline", - "description": "Add a newline before the prompt", - "default": false + "anyOf": [ + { + "properties": { + "filler": { + "$ref": "#/definitions/filler" + }, + "newline": { + "type": "boolean", + "title": "Newline", + "description": "Add a newline before the prompt", + "default": false + } + } } - } + ] }, "valid_line": { "$ref": "#/definitions/extra_prompt",