Bash highlighting quirk, coloring certain paths (*/share/*)
Testing with xterm256, ansi, and truecolor outputs, I noticed that any paths including the segment
/share/ had a different color applied to the
Simply reproducible with:
$ echo '~/.local/share/' | highlight -O truecolor -S bash $ echo '/share/' | highlight -O truecolor -S bash
And here's a script that made this apparent to me:
#!/bin/zsh -e rm -f ~/.local/share/applications/kcm/*.desktop(N) mkdir -p ~/.local/share/applications/kcm cd /usr/share/kservices5 cp $(rg -l X-KDE-ServiceTypes=KCModule) ~/.local/share/applications/kcm/ cd ~/.local/share/applications/kcm sed -i -E 's/^Type=Service$/Type=Application/g' *.desktop sed -i -E 's/^X-KDE-System-Settings-Parent-Category=.+//g' *.desktop
I reproduced on all recent versions I tried, currently 3.57.
/share alone does not do this, so I tried the following:
$ echo '/share' | highlight -O truecolor -S bash -v 2> noslash $ echo '/share/' | highlight -O truecolor -S bash -v 2> slash $ diff -u noslash slash
But found that the debugging output is identical.