Nп/п : 40 из 100
 От   : Janis Papanagnou                    2:5075/128        08 сен 23 16:04:10
 К    : Kaz Kylheku                                           08 сен 23 17:05:02
 Тема : Re: Nice prompt [Bash specific]
----------------------------------------------------------------------------------
                                                                                 
@MSGID: 1@dont-email.me> 4eb4ae59
@REPLY: <20230803112254.131@kylheku.com> a20f5c6e
@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>
@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 03.08.2023 20:31, Kaz Kylheku wrote:
> [...]
>     local status="$esc[7m$(date +%m-%d/%H:%M)$esc[m $HOSTNAME $dots$pwd"
>     local status_nohl="$(date +%m-%d/%H:%M) $HOSTNAME $dots$pwd"
>     [ ${#status_nohl} -le $COLUMNS ] && break
> [...]

One more question; is there any neat way to get the "net" length of a
string that carries ANSI control characters (without duplicating the
code as above)?

Initially I wanted to add [ANSI-escape] colors to my "kosta" variant
(e.g. somthing like  errorsshlvlpath...),
but lacking a good idea I abstained from supporting that feature.

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



   GoldED+ VK   │                                                 │   09:55:30    
                                                                                
В этой области больше нет сообщений.

Остаться здесь
Перейти к списку сообщений
Перейти к списку эх