spring-shell icon indicating copy to clipboard operation
spring-shell copied to clipboard

StyleSettings interface "highlight" method failing to apply style.

Open pXius opened this issue 9 months ago • 0 comments

Context: Overriding org.springframework.shell.style.StyleSettings allows you to change tag styling behaviour. Ie. You can override "style-title" to render "bold,italic" instead of just "bold".

The overridden StyleSettings can then be used as part of ThemeSettings to create a new Theme.

An example can be found here in the Catalog Sample App.

Expected behaviour: All styling returned by overridden highlight() method should be applied.

@Override
public String highlight() {
	return "bold,italic,fg:bright-cyan";
}

Current Behaviour Only bold and italic are applied, color and other styling options seem to be ignored.

This behaviour is also present in the Catalog sample app on branch 3.2.4, 3.3.0-M1 and main.

Tested on various terminals on MacOs Sonoma 14.4.1 using ZSH. Tested on default terminal on Ubuntu 22.04.4 LTS using Bash.

Here is the Catalog app where the highlighted row is expected to be bright-cyan as per code here.

image

pXius avatar May 03 '24 14:05 pXius