Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Vanishing files ?



>>>>> "Anssi" == Anssi Saari <as@xxxxxx> writes:

    Anssi> That doesn't really work for escape sequences now does it?
    Anssi> For example, on this machine, my prompt under script is
    Anssi> shown in less like this:

    Anssi> ^MESC[m^OESC[mESC[mESC[Jkuori% ESC[Kls^M

    Anssi> That sed removes the ^M and escapes, but what it leaves
    Anssi> behind is [m[m[m[Jkuori% [K

I used the following scripts for years, can be translated to zsh:

while (<>) {
        s/\015$//;
        s/^\015//;
        s/[^\010]\010//g;
        s/\033\[(;?\d+)*[a-zA-Z]//g;
        s/^\017//;              # ^O inserted by screen
        print;
        }



Messages sorted by: Reverse Date, Date, Thread, Author