Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: some color fails in command.
- X-seq: zsh-users 22802
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: some color fails in command.
- Date: Tue, 8 Aug 2017 21:16:53 +0100
- 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==
- In-reply-to: <3d606eba-4475-8676-0fe5-f189062d5b65@eastlink.ca>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <3d606eba-4475-8676-0fe5-f189062d5b65@eastlink.ca>
On Tue, 08 Aug 2017 12:39:40 -0700
Ray Andrews <rayandrews@xxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author