From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id f39ea812 for ; Sat, 24 Nov 2018 17:52:57 +0000 (UTC) Received: (qmail 15992 invoked by alias); 24 Nov 2018 17:52:39 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 43840 Received: (qmail 4649 invoked by uid 1010); 24 Nov 2018 17:52:39 -0000 X-Qmail-Scanner-Diagnostics: from park01.gkg.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.100.2/25112. spamassassin: 3.4.2. Clear:RC:0(205.235.26.22):SA:0(-1.6/5.0):. Processed in 3.274664 secs); 24 Nov 2018 17:52:39 -0000 X-Envelope-From: SRS0=MObh=OD=yahoo.co.uk=okiddle@bounces.park01.gkg.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Virus-Scanned: by amavisd-new at gkg.net Authentication-Results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1543081946; bh=8YdFMSYK1HJmL1yYZpm0O+Bd3NKGQAkYyinPuwffa9Y=; h=From:References:To:Subject:Date:From:Subject; b=ak7Yr5ct0dzl0Fujqg/hRkP+PLpVU+iA4/otk9uAavdJ1JR8o0Mt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WZ31hj9Pl5XNmgyMxyUsuAIgi1yiJEP6FjBdGmQA7YUywCIAjQu3ABHYkVJ friIKSFo4ppJvMZ9JpRGsujuMxp3.KndNyKsFE7k2pCDr_aT7DrNLPaUGhuuedqiJK0KcxzE62MH 3.b5BEFZ4GH79uwqmiAumZBQ7ZOQy4uuYQ9U9fDY0D0HuNA7Bg3_R9ZiyAWYlcZ_6tvadCBwuRFn rUhkjztum5hbGCGwC__CepBZsfHO12P.cmMynFMCBXhB3MkOQH6dA5myTyvToU_aGi26Su16Jegl wzdVqXLm.c3jZ_4yCpgRkqMi3k4EDtwZbEAKS0C_banoCCOKq3yz1z1f7 cc: Zsh hackers list In-reply-to: From: Oliver Kiddle References: <2362-1541646201.813952@nGIL.zWP_.YhaK> <20626-1541726901.821000@xGvJ.shtD.SkCN> To: Sebastian Gniazdowski Subject: highlight test cases (was Re: [BUG?] If true-color is used, overlapping colors do not work) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <31158.1543080743.1@hydra> Content-Transfer-Encoding: quoted-printable Date: Sat, 24 Nov 2018 18:32:23 +0100 Message-ID: <31159-1543080743.164776@h8df.-SiL.hblq> On 11 Nov, Sebastian Gniazdowski wrote: > I have new fresh test file which I hope brings the X04 test to some > new stage or level. The lines sent to zpty now aren't repeated, Sorry, I hadn't found time to look at this. Given that ensuring portability has proved tricky with the existing zpty based tests I'm rather leery of including new ones and would be happier if someone else were to take a look. The tests now pass on my system. > I've used zle -T tc tcfunc, which sets REPLY=3D"", i.e. discards the > codes. Should I change them to something? Because I'm only getting LE If removing them works for the particular tests then I'd have thought this was fine. > I'm currently removing following escapes from all zpty output: > - ^[[?2004h > - ^[[?2004l unsetting zle_bracketed_paste will prevent zsh from generating these which is better than removing them afterwards. > PS. Didn't yet search for terminfo file, just did export > TERM=3Dxterm-256, not actually sure how to search for the definition Searching probably isn't easy to do portably. Perhaps guessing like this is better, but it would be good to check $termcap[Co] afterwards and skip tests as appropriate. > { zpty -r zsh } | sed $'/[^[:space:]]/!d; s/\r$//; s/\x1b\\[[0-9;]= *m//g; s/\x1b\\[[JK]//g; s/\x1b\\[?[0-9]*[hl]//g' | while read REPLY; do R= EPLY=3D${REPLY//(#b)((?(#c0,1))$cm(?(#c0,1)))/${${${(M)match[2]:#${match[3= ]}}:+${match[2]}}:-${${match[1]##[[:space:]]##}%%[[:space:]]##}}}; print -= rn -- "$REPLY"; done This use of sed isn't portable. In particular, the use of semi-colons to separate commands and the [[:space:]] character class are extensions. You can use literal spaces and multiple -e options. Either that or do the substitutions in zsh. The heirloom project (http://heirloom.sourceforge.net/tools.html) is a good source for lowest common denominator versions of Unix tools if you don't have an old OS available. Oliver