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

Re: Various problems with 3.0.1-test1



> 1) 
> 
> % ./zsh -fc 'shift 2; print $*' first second third fourth               
> second third fourth fourth

The fix is included below.  I broke it in 3.0.1-test.  It worked in 3.0.0
but in 3.0.0 shift array did not work when KSH_ARRAYS was set.

> 2) This is very puzzling.
> 
> % ./zsh -fc 'setopt extendedglob;  [[ PATH = [A-Z]# ]] || print Failed.'
> Failed.

This is know and probably not a bug.  extendedglob affects parsing and
parsing the -c argument is dode before anything is executed.  Similarily
aliases do not work here.

./zsh -o extendedglob -fc '[[ PATH = [A-Z]# ]] || print Failed.'

works.

> 3) This is minor but probably wrong:
> 
> % ./zsh -fc '1this_is_ignored=foo; print $1'
> foo
> 
> ksh prints:
> ksh: 1this_is_ignored=foo:  not found

It is probably trivial but I have no more time no (I would need some other
5 minutes for that).

Zoltan

*** Src/params.c	1996/09/07 15:19:40	2.37
--- Src/params.c	1996/09/10 13:49:02
***************
*** 964,972 ****
  {
      Value v;
  
!     if (!((v = getvalue(&s, 0)) && PM_TYPE(v->pm->flags) == PM_ARRAY))
! 	return NULL;
!     return v->pm->gets.afn(v->pm);
  }
  
  /**/
--- 964,973 ----
  {
      Value v;
  
!     if (!idigit(*s) && (v = getvalue(&s, 0)) &&
! 	PM_TYPE(v->pm->flags) == PM_ARRAY)
! 	return v->pm->gets.afn(v->pm);
!     return NULL;
  }
  
  /**/



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