From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24724 invoked by alias); 1 Feb 2018 07:30:43 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23107 Received: (qmail 5024 invoked by uid 1010); 1 Feb 2018 07:30:43 -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.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(205.235.26.22):SA:0(-1.4/5.0):. Processed in 2.662521 secs); 01 Feb 2018 07:30:43 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_PASS,T_DKIM_INVALID,T_RP_MATCHES_RCVD autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: SRS0=VEFE=E3=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=1517470225; bh=/PJpa+xRn+ltenDMDN0b31ApJNc2oUG6H4UXQy+Xc/s=; h=From:References:To:Subject:Date:From:Subject; b=gf31Q3js9b2oDalOANvjUHwjHoAtVY5Ncx8luyu4JQ2iqGcJjhDdqyBfW8qKpuLa+ROeJONPYT9D1oa2ZDTfZSXLs4b3ijEtKu7FvT/XcscKC1uPfoYGnXlA9IGG3hXymHSsWiy5243JCUqr7Mbp49pc5nbx14/qh7st9QqrHqB8RSmk1o3YthHhdSCSew4CqnOhRbv2xkI6EeVmBI+Y8kyFpiXJTvYmRZ2cX6GNj1pney+cgC1pOmtdQATDZqp7OsMS8tkg0QzcnD7q9d5y19CnKgedUUkuYt2ke1qcGe3D2DtUVyOt/zGrFEHs3DocOfXga+QFu2lOQ8ikKVki/Q== X-YMail-OSG: DrscV0sVM1lk4R0jxDP2tsIidW5co2T_Z4l48aU5.auqInudCDO3HIGp6SkZsjl ucEGGBwnki26REqIDWnSaYH1P9uS7yu2Z3.T7XLkKhRRqPPky1vQ4CtiJDkl7aweikqrZXr5dHaP WYse6sNgJPocz1HXEMnKlO5quOZYY7sTjQzL8P8C8jxa0mSs.ISYpvg8jHzThAluk3CbmChFk1sd YJ4iMZ4x_SwTNFg.t8QcZEl75RLzfIIvz.TNsXKRDw_Vo3aOSIRMdZI.M9TxrDP8Qt6UvQQYzUK9 uQDdzdS_ohsxEfB9iOgxtKkPBXHdrEDDfFOv_RUlqULzbuAPgP.ZqrVkoEelFs1zfFxqHVM6C6z1 BBiNaJdyc6XJmuAXS2cw_NyRlH4NNt.KevXiZB6obhNNiQ1vZXrz3.fmI8ob2haw80s7eZeguG9. n0Uy0Iu6wpGT9XcgjTdXtaQCcd_BL8IVKkIDxiIsDoaiFLSFdiVoHiDHQ5bj6N0Qri_AUuWAFKPo Y_M6dUNUPfg-- In-reply-to: <7771fca9-b248-3159-8597-65ddb057214d@eastlink.ca> From: Oliver Kiddle References: <7771fca9-b248-3159-8597-65ddb057214d@eastlink.ca> To: Zsh Users Subject: Re: multios stripping colors? MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <13087.1517470216.1@thecus.kiddle.eu> Content-Transfer-Encoding: 8bit Date: Thu, 01 Feb 2018 08:30:16 +0100 Message-ID: <13088.1517470216@thecus.kiddle.eu> Ray Andrews wrote: > >     $   eval "$@" > > That line in a function of mine can successfully eat some very complex > input including various pipes and color codes.  However, when I try this: eval "eats" only shell syntax. Colour codes are eaten by your terminal. Perhaps you contrived to prevent them being generated or constructed something to filter them out. > $ eval "$@" >&2 >! /tmp/_output > > Although I do get both outputs, the screen looses all colorized output There is nothing intrinsic to your construct that loses colour escape sequences. Try the following: eval "print -P '%K{blue}Hello'" >&2 >! /tmp/_output cat /tmp/_output This should give you a blue background from both commands. So you might need to take a closer look at exactly what argument you are passing to eval. Some commands, make coloured output conditional on whether their standard output points to a terminal. For an example, try: git log | cat Oliver