[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fixing escape format when values are empty
From: |
Greg Wooledge |
Subject: |
Re: Fixing escape format when values are empty |
Date: |
Thu, 8 Apr 2021 07:06:39 -0400 |
On Wed, Apr 07, 2021 at 10:49:41PM -0500, Dennis Williamson wrote:
> On Wed, Apr 7, 2021, 10:47 PM <pauline-galea@gmx.com> wrote:
>
> > I am using the following format to use colour when displaying text.
> > an is the attribute number, bn is the background number, fn is the
> > foreground number.
> >
> > fmt="\e[${an};${bn};${fn}m"
> > printf "${fmt}%s\e[0m" "Jane"
> > But "an", "bn", "fn" can be empty, and I then have to
> > fix fmt.
"Fix" in what way?
> Please use tput.
They're doing crazy shit. I don't think tput can do this. tput is
designed only to do regular shit.