help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Colour certain parts of a string


From: lacsaP Patatetom
Subject: Re: Colour certain parts of a string
Date: Mon, 20 Mar 2023 15:05:46 +0100

hi,

if it is a programming exercise, you could for example use sed, match the
part, capture it and rewrite it with color on/off at begin/end of it.
otherwise there is hl <https://github.com/mbornet-hl/hl> that responds to
the coloring of parts of the text.

regards, lacsaP.

Le lun. 20 mars 2023 à 14:41, uzibalqa <uzibalqa@proton.me> a écrit :

>
> I would like to take a string and colour certain parts by calling a
> function named "glow".
>
> For instance, the following would colour the square brackets in blue
> whilst keeping the
> rest at the default terminal colour.
>
> glow "[" "]" $str
>
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]