Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: perl 5.22 causes warnings when zsh calls it
- X-seq: zsh-workers 35690
- From: John <da_audiophile@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Re: perl 5.22 causes warnings when zsh calls it
- Date: Sun, 5 Jul 2015 12:41:36 +0000 (UTC)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1436100097; bh=YFXaxqm2zQ4gtxJtp1b3irFc7xvnuq0MLH6QOY7Xaa0=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=h83CEMi8Yqe2BiHmlceMVpcHRfxVvMyDjsab1Za88KCzL+zLFgIWkPnJHL9Yx1OdDYrCQ4Xx9pS+/U0gVh35xc2AWXMhvBURdkEOKvFshNWgDgXE/UoCvD/0+IChrFAhtOF/Y4mbxOYt4utWGIdFtkLG3SsLjucww6P85686XVQ3yURkCKfq69N6U71m1wYepodn0skdYQgQaQfShv4uIygj9yymkvCCXREQzIO6z+9Ujit2mlTK17hLPqixQy2BQ+gwnidgBRuRP7SvG7dTQsg1DffEdtFHE+QkYYAzLql7pkZlf+D5Ys8KMbQok9IXvpBEVn2GyQrKR3DXPDLAXA==
- In-reply-to: <150628140435.ZM1792@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <150628140435.ZM1792@torch.brasslantern.com>
- Reply-to: John <da_audiophile@xxxxxxxxx>
Thanks, this works. Will it be incorporated into the next release of zsh?
----- Original Message -----
> Aside: Damn, it's hard to get curly braces into a pattern in a parameter
> substitution inside double quotes.
>
>
> diff --git a/Functions/Prompts/prompt_adam1_setup
> b/Functions/Prompts/prompt_adam1_setup
> index 034641f..aca0e59 100644
> --- a/Functions/Prompts/prompt_adam1_setup
> +++ b/Functions/Prompts/prompt_adam1_setup
> @@ -14,8 +14,6 @@ This theme works best with a dark background.
> Recommended fonts for this theme: nexus or vga or similar. If you
> don't have any of these, then specify the `plain' option to use 7-bit
> replacements for the 8-bit characters.
> -
> -And you probably thought adam1 was overkill.
> EOF
> }
>
> @@ -27,8 +25,9 @@ prompt_adam1_setup () {
> base_prompt="%K{$prompt_adam1_color1}%n@%m%k "
> post_prompt="%b%f%k"
>
> - base_prompt_no_color=$(echo "$base_prompt" | perl -pe
> "s/%(K{.*?}|k)//g")
> - post_prompt_no_color=$(echo "$post_prompt" | perl -pe
> "s/%(K{.*?}|k)//g")
> + setopt localoptions extendedglob
> +
> base_prompt_no_color="${base_prompt//(%K{[^\\\}]#\}|%k)/}"
> +
> post_prompt_no_color="${post_prompt//(%K{[^\\\}]#\}|%k)/}"
>
> add-zsh-hook precmd prompt_adam1_precmd
>
> }
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author