Rundeck: Misinterpreted ANSI escape sequence

Created on 29 Jun 2020  Â·  3Comments  Â·  Source: rundeck/rundeck

Describe the bug
1;38;5;113 is interpreted as blinking bold black text

My Rundeck detail

  • Rundeck version: e.g. 3.2.4-20200318
  • install type: unsure
  • OS Name/version: unsure
  • DB Type/version: unsure

To Reproduce
Steps to reproduce the behavior:

  1. Go to "Commands"
  2. Pick a node
  3. Execute echo -e "\033[1;38;5;113mThis is a test\033[0m". To achieve that, it seems you have to type in echo -e '"\033[1;38;5;113mThis is a test\033[0m"'
  4. Look at the output
  5. Compare with the color and formatting you have when you do 3 in your own terminal

Expected behavior
Green, not blinking text

green

Screenshots

Peek 2020-06-29 14-11

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Firefox
  • Version 77.0

Additional context
5 means "blink" but the above does not cause blinking in my terminal.

SO says:

38 â•‘ Set foreground color â•‘ Next arguments are 5;<n> or 2;<r>;<g>;<b>, see below

So 1;38;5;113 should be interpreted as bold, Set foreground color to 113 (which is green)

bug

Most helpful comment

I think the combination of 1; (bold) and the 38;5;113 (256 color setting) is not getting interpreted correctly. If you remove the bold, it seems to work echo '"\033[38;5;113mThis is a test\033[0m"'.
this is a bug

All 3 comments

Hi @gargrag

Works in this way (following this):

echo -e '"\033[1;32mThis is a test\033[0m"'

Screenshot_4

Regards!

@MegaDrive68k thank you for the workaround, but I would also want it to work with the more complicated 1;38;5;113, because that's what the library I use (here symfony/var-dumper) uses. Please note that this library is very widely used in the PHP world (135M downloads!), and that this bug probably affects a lot of folks.

Why did you remove the status:reproduced label BTW?

Here is a link so you can see what other escape sequences are in use in that library: https://github.com/symfony/symfony/blob/092632dc1435ff2ab50d27ea5106ece7afe1a6df/src/Symfony/Component/VarDumper/Dumper/CliDumper.php#L34

I think the combination of 1; (bold) and the 38;5;113 (256 color setting) is not getting interpreted correctly. If you remove the bold, it seems to work echo '"\033[38;5;113mThis is a test\033[0m"'.
this is a bug

Was this page helpful?
0 / 5 - 0 ratings