
Am Sonntag, 6. Dezember 2020, 21:39:16 CET schrieb Marcus Hüwe:
On 2020-12-06 21:21:21 +0100, Hans-Peter Jansen wrote:
Am Sonntag, 6. Dezember 2020, 04:23:53 CET schrieb Simon Lees:
There is a tool "grc" that uses regular expressions, it does a reasonable job and is certainly better then nothing. I've been using it for around 5 years and it works well enough for me but patches to make it better are more then welcome.
zypper in grc
grc osc build
Exactly, what I was looking for, thanks Simon.
Now I need to train my vegetative nervous system to type grc before osc build..
Maybe something like this does the trick (untested):
marcus@linux:~> cat ~/bin/color_build #!/bin/bash exec grc build $@ marcus@linux:~> chmod +x ~/bin/color_build marcus@linux:~> osc config general build-cmd ~/bin/color_build 'general': 'build-cmd' is set to '/home/marcus/bin/color_build' marcus@linux:~>
Nice trick, Marcus, but I get a completely different output for that case. $ grc osc build # nice and expressive: https://paste.opensuse.org/91070912 root# echo > /usr/local/bin/colored_build << EOF !/bin/bash exec /usr/bin/grc /usr/bin/build "$@" EOF root# chmod +x /usr/local/bin/colored_build root# echo >> /etc/sudoers.d/local-build << EOF hp ALL = NOPASSWD: /usr/local/bin/colored_build EOF $ osc config general build-cmd /usr/local/bin/colored_build # rather greenish: https://paste.opensuse.org/96352274 Hmm. Pete