From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13353 invoked by alias); 8 Aug 2017 20:17:01 -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: X-Seq: 22802 Received: (qmail 14484 invoked by uid 1010); 8 Aug 2017 20:17:01 -0000 X-Qmail-Scanner-Diagnostics: from know-smtprelay-omc-10.server.virginmedia.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(80.0.253.74):SA:0(-2.8/5.0):. Processed in 1.108302 secs); 08 Aug 2017 20:17:01 -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=-2.8 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: p.w.stephenson@ntlworld.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Originating-IP: [86.21.219.59] X-Authenticated-User: p.w.stephenson@ntlworld.com X-Spam: 0 X-Authority: v=2.1 cv=SeoKDalu c=1 sm=1 tr=0 a=utowdAHh8RITBM/6U1BPxA==:117 a=utowdAHh8RITBM/6U1BPxA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=x7bEGLp0ZPQA:10 a=lwwXzCrcdbGJLTwHbuwA:9 a=CjuIK1q_8ugA:10 Date: Tue, 8 Aug 2017 21:16:53 +0100 From: Peter Stephenson To: Zsh Users Subject: Re: some color fails in command. Message-ID: <20170808211653.6bb279b6@ntlworld.com> In-Reply-To: <3d606eba-4475-8676-0fe5-f189062d5b65@eastlink.ca> References: <3d606eba-4475-8676-0fe5-f189062d5b65@eastlink.ca> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ntlworld.com; s=meg.feb2017; t=1502223414; bh=6oF8nXJ4JfS6GkdNCqaKIdX4kHSD1G+VMDhPOVaipuI=; h=Date:From:To:Subject:In-Reply-To:References; b=3pIig4fgO6e+U71uGkNVFWv31gjscIfSUJeZNHgQeSLfOQ91MxBZBAw2otjX4mhoC gxgiu7D53tvPdzK2+RklgSndGEtRvQ3o1RQq5Z0qZliFVfJVKYGMBVyPB4GL9wBkH1 ErsqFfx4yP3dy6sDoNXn0NOvDAkYOQj/WyHtkwcYk5OwxjDD9NRMIr5Vhcf434zMHc KXMIqwbEYMShhNiegrsoJN52jKxP1pzahTxQtn6mnvDOS4PkdbZuJZj9V5BMn0E/JK 5RAAfX3QS4DDhEbPLafY6v96/lhT8iJX0cYA8W0Jt2Gy+ayuXBdfIjGwLhFq4cRq+z fjwVuUg51licQ== On Tue, 08 Aug 2017 12:39:40 -0700 Ray Andrews wrote: > Gentlemen: > > echo -e "$fg[red]foo" > echo -e "\e[36;1mbar\e[0m" > > Sourced, both work, but if I make the script executable the top one > fails (stays B&W) but the second line continues to work as expected. > How should I understand that? The executable file does not pick up whichever start-up file it is in which you are doing something like autoload colors colors so $fg is not defined. I'm guessing it's .zshrc. If you move this to .zshenv it should work (unless you are explicitly suppressing that with the -f option). The second set, being raw escape sequences, are always interpreted by the terminal. pws