Hi John,

>> no, you’ve discovered you did not read the manpage ☺
>
> I did read it, but I didn't understand it...!  Adding the \r and surrounding
> all escape sequences with \1 solves my problem, but I don't understand why 
> (?).

Ah okay.

Basically, the first \1\r says: make the \1 into a marker.

After that, \1 switches between “counted / visible” and
“not counted / invisible”.

So, in an example: $'\1\r\1\033[1m\1$PWD\1\033[0m\1 % '

\1\r - define marker
\1\033[1m\1 - invisible part
$PWD - visible part
\1\033[0m\1 - invisible part
 %  - visible part

Hope this clears it up.

By the way, use just $? instead of $(echo $?) ☺ or look how
dot.mkshrc handles that (it shows $?| if $?≠0).

bye,
//mirabilos
-- 
11:56⎜«liwakura:#!/bin/mksh» also, i wanted to add mksh to my own distro │
i was disappointed that there is no makefile │ but somehow the Build.sh is
the least painful built system i've ever seen │ honours CC, {CPP,C,LD}FLAGS
properly │ looks cleary like done by someone who knows what they are doing

Reply via email to