Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [^ax-y] doesn't work but [^x-ya] does



On Wed, 8 Mar 2017 21:18:22 -0800
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> With pptr still pointing at "\233" (Dash).  Hopefully the following
> doesn't re-break anything else.
> 
> diff --git a/Src/params.c b/Src/params.c
> index b89fb74..bee01c5 100644
> --- a/Src/params.c
> +++ b/Src/params.c
> @@ -1987,7 +1987,9 @@ fetchvalue(Value v, char **pptr, int bracks, int flags)
>  	*s++ = '$';
>      else if (c == Star)
>  	*s++ = '*';
> -    else if (c == '#' || c == '-' || c == '?' || c == '$' ||
> +    else if (IS_DASH(c))
> +    	*s++ = '-';
> +    else if (c == '#' || c == '?' || c == '$' ||
>  	     c == '!' || c == '@' || c == '*')
>  	s++;
>      else
> 

I'll tack this test onto D04 when I commit it.

pws

  () {
    setopt localoptions extendedglob
    [[ $- = [[:alnum:]]## ]] || print Failed 1
    [[ ${-} = [[:alnum:]]## ]] || print Failed 2
  }
0:$- expansion correctly handles Dash token



Messages sorted by: Reverse Date, Date, Thread, Author