argos
argos copied to clipboard
ANSI colors not showing (when escape is first character on line)
Given this script
#!/bin/bash
echo -e "Testing ansi\n---"
echo -e "\e[36mFirst char is escape, color doesn't work | ansi=true emojize=false unescape=false trim=false useMarkup=false"
echo -e "\e\e[36mDouble esc char renders strangely | ansi=true emojize=false unescape=false trim=false useMarkup=false"
echo -e " \e[36ma space as first char; works| ansi=true emojize=false unescape=false trim=false useMarkup=false"
echo -e "\e[36ma zero-width space as first char; works | ansi=true emojize=false unescape=false trim=false useMarkup=false"
I get the following results on Gnome Shell 42.9 with Argos master branch (I changed metadata.json to allow this to run on my Gnome version)
If this is a problem with my Gnome version, I understand it's not supported. However, I thought I'd report this in case it's a bug in Argos ANSI handling.
The same happens when using the <span color="yellow">Foo</span> syntax.
I also came up with using a zero-width space as the first character to work around this. The space may also be written as ​ to make it more "visible" in the script.
I discovered this is actually a bug in mutter, not in argos.
https://gitlab.gnome.org/GNOME/mutter/-/issues/1324
Re-opened as it shows the workaround