----------------------------------------------------------------------------------
@MSGID: 1@dont-email.me> a32f206a
@REPLY: 1@dont-email.me> 716f0dbb
@REPLYADDR Janis Papanagnou
<janis_papanagnou+ng@hotmail.com>
@REPLYTO 2:5075/128 Janis Papanagnou
@CHRS: CP866 2
@RFC: 1 0
@RFC-Message-ID: 1@dont-email.me>
@RFC-References: <20230803112254.131@kylheku.com>
1@dont-email.me> <20230908194428.631@kylheku.com> 1@dont-email.me>
@TZUTC: 0200
@PID: Mozilla/5.0 (X11; Linux x86_64; rv:45.0)
Gecko/20100101 Thunderbird/45.8.0
@TID: FIDOGATE-5.12-ge4e8b94
On 09.09.2023 05:39, Janis Papanagnou wrote:
>
> For ksh, maybe defining a discipline function for a "no_ansi"
> variable would be a sensible implementation, say,
>
> no_ansi=${status} ; printf "${no_ansi}"
no_ansi=${status} ; printf "${#no_ansi}"
Typo; I wanted to get the length of the string for the status line
calculation, but both calls are useful and the logic would anyway
be in the no_ansi.set discipline function.
Hmm.. - pondering also about a type definition with that property
(vs. a variable specific definition).
>
> with function no_ansi.set removing the ANSI escapes using a
> variable substitution (or a C-compiled shell built-in)?
>
> Janis
>
--- Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
* Origin: A noiseless patient Spider (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5075/128
@PATH: 5075/128 5020/1042 4441