zsh-users
 help / color / mirror / code / Atom feed
* _normal:26: bad math expression: operator expected at `0 '
@ 2002-04-25 14:26 Roman Neuhauser
  2002-04-25 14:29 ` Sven Wischnowsky
  0 siblings, 1 reply; 7+ messages in thread
From: Roman Neuhauser @ 2002-04-25 14:26 UTC (permalink / raw)
  To: zsh-users

Hi there,

after about six months of using about 0.01% of the goodies zsh offers,
I decided it was time to checkout compinit. The exploration ended up
before it started with an error I don't know what to think about (I can
read some basic shell scripting, but that's about it). Also note that
I've searched the archives, but only found unrelated messages.

roman@roman ~ > autoload -U compinit                               101:0
roman@roman ~ > compinit                                           102:0
roman@roman ~ > tar xzf sub^I                                      103:0
_normal:26: bad math expression: operator expected at `0 '

At this moment, I'm supposed to be impressed. :)

roman@roman ~ > tar xzf subversion-r1587.tar.gz                    103:0
...
roman@roman ~ > cd /usr/local/share/zsh/4.0.4/functions            106:0
roman@roman zsh/4.0.4/functions > cat -n _normal|grep -EC3 '^ +26' 107:0
    23                                   
    24    return ret
    25  else
    26    if (( $+builtins[$command] + $+functions[$command] )); then
    27      cmd1="$command"
    28      curcontext="${curcontext%:*:*}:${cmd1}:"
    29    elif [[ "$command[1]" = '=' ]]; then
roman@roman zsh/4.0.4/functions >                                  108:0

It does that for ^I completion as well. What's up?

-- 
FreeBSD 4.4-STABLE
4:07PM up 10 days, 5:20, 14 users, load averages: 0.08, 0.20, 0.15


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: _normal:26: bad math expression: operator expected at `0 '
  2002-04-25 14:26 _normal:26: bad math expression: operator expected at `0 ' Roman Neuhauser
@ 2002-04-25 14:29 ` Sven Wischnowsky
  2002-04-25 15:06   ` Roman Neuhauser
  0 siblings, 1 reply; 7+ messages in thread
From: Sven Wischnowsky @ 2002-04-25 14:29 UTC (permalink / raw)
  To: zsh-users


Roman Neuhauser wrote:

> ...
> 
> roman@roman ~ > autoload -U compinit                               101:0
> roman@roman ~ > compinit                                           102:0
> roman@roman ~ > tar xzf sub^I                                      103:0
> _normal:26: bad math expression: operator expected at `0 '
> 
> At this moment, I'm supposed to be impressed. :)

We had this in one of the CVS-versions, but it has long been fixed.
Where did you get that version from? Anyway, try it with either one of
the stable versions or with the latest CVS.

And *then* be impressed. Or something.


Bye
  Sven

-- 
Sven Wischnowsky                          wischnow@berkom.de


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: _normal:26: bad math expression: operator expected at `0 '
  2002-04-25 15:06   ` Roman Neuhauser
@ 2002-04-25 15:00     ` Peter Stephenson
  2002-04-25 15:38       ` Roman Neuhauser
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Stephenson @ 2002-04-25 15:00 UTC (permalink / raw)
  To: Zsh users list

Roman Neuhauser wrote:
> roman@roman ~ > echo $ZSH_VERSION                                      124:0
> 4.0.4
>
> So, is 4.0.4 not a stable version?

Check your $fpath to see if it's possibly picking up other versions of
the function.

It's hard to see how this problem can occur in 4.0.4, unless there's
some additional option we should be setting for compatibility in the
list given by $_comp_options.  If it really is the function from 4.0.4,
try running `emulate zsh' before starting and using the new completion
system.  If it works after that, it would help if you send a list of
options you've got set.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: _normal:26: bad math expression: operator expected at `0 '
  2002-04-25 14:29 ` Sven Wischnowsky
@ 2002-04-25 15:06   ` Roman Neuhauser
  2002-04-25 15:00     ` Peter Stephenson
  0 siblings, 1 reply; 7+ messages in thread
From: Roman Neuhauser @ 2002-04-25 15:06 UTC (permalink / raw)
  To: Sven Wischnowsky; +Cc: zsh-users

> From: Sven Wischnowsky <wischnow@berkom.de>
> Date: Thu, 25 Apr 2002 16:29:11 +0200
> To: zsh-users@sunsite.dk
> Subject: Re: _normal:26: bad math expression: operator expected at `0 '
>
> Roman Neuhauser wrote:
> 
> > roman@roman ~ > autoload -U compinit                               101:0
> > roman@roman ~ > compinit                                           102:0
> > roman@roman ~ > tar xzf sub^I                                      103:0
> > _normal:26: bad math expression: operator expected at `0 '
> > 
> > At this moment, I'm supposed to be impressed. :)
> 
> We had this in one of the CVS-versions, but it has long been fixed.
> Where did you get that version from? Anyway, try it with either one of
> the stable versions or with the latest CVS.

roman@roman ~ > echo $ZSH_VERSION                                      124:0
4.0.4
roman@roman ~ >                                                        125:0

Installed from the port (/usr/ports/shells/zsh/).

Snippet from the port Makefile:

MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE} \
        ftp://ftp.zsh.org/%SUBDIR%/ \
        ftp://ftp.sterling.com/%SUBDIR%/ \
        ftp://ftp.rge.com/pub/shells/%SUBDIR%/ \
        ftp://ftp.fu-berlin.de/pub/unix/shells/%SUBDIR%/ \
        ftp://ftp.ips.oz.au/pub/packages/%SUBDIR%/ \
        ftp://ftp.uit.no/pub/unix/shells/%SUBDIR%/

The port fetches zsh-4.0.4-doc.tar.gz zsh-4.0.4.tar.gz from the first
available site in the list above.

Pity the function definition files don't contain $Id$, it'd be clear
what version of the file that is.

Also of interest might be my `uname -a`, but I first tried compinit (and
found the bug) on a fresh 4.5-STABLE (zsh-4.0.4 as well).

FreeBSD roman.mobil.cz 4.4-STABLE FreeBSD 4.4-STABLE #0: Wed Dec 26
12:45:18 CET 2001
root@roman.mobil.cz:/usr/obj/usr/src/sys/CRUDPUPPY_3  i386

So, is 4.0.4 not a stable version?

-- 
FreeBSD 4.4-STABLE
4:54PM up 10 days, 6:07, 14 users, load averages: 0.29, 0.22, 0.22


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: _normal:26: bad math expression: operator expected at `0 '
  2002-04-25 15:38       ` Roman Neuhauser
@ 2002-04-25 15:32         ` Peter Stephenson
  2002-04-25 15:57           ` Roman Neuhauser
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Stephenson @ 2002-04-25 15:32 UTC (permalink / raw)
  To: Zsh users list

Roman Neuhauser wrote:
> > It's hard to see how this problem can occur in 4.0.4, unless there's
> > some additional option we should be setting for compatibility in the
> > list given by $_comp_options.  If it really is the function from 4.0.4,
> > try running `emulate zsh' before starting and using the new completion
> > system.  If it works after that, it would help if you send a list of
> > options you've got set.
> 
>     You've nailed it down, thanks! Let me know if you need anything else.
> 
>     roman@roman ~ > setopt                                        107:0
>...
>     octalzeroes
>...

This is the one.  I think this applies cleanly to 4.0, but it's obvious
how to do it by hand anyway.

You can fix it simply by editing the installed compinit to add
NO_octalzeroes to _comp_options.

Index: Completion/compinit
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/compinit,v
retrieving revision 1.8
diff -u -r1.8 compinit
--- Completion/compinit	13 Mar 2002 09:28:05 -0000	1.8
+++ Completion/compinit	25 Apr 2002 15:29:47 -0000
@@ -144,6 +144,7 @@
     NO_allexport
     NO_aliases
     NO_errexit
+    NO_octalzeroes
 )
 
 # And this one should be `eval'ed at the beginning of every entry point

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: _normal:26: bad math expression: operator expected at `0 '
  2002-04-25 15:00     ` Peter Stephenson
@ 2002-04-25 15:38       ` Roman Neuhauser
  2002-04-25 15:32         ` Peter Stephenson
  0 siblings, 1 reply; 7+ messages in thread
From: Roman Neuhauser @ 2002-04-25 15:38 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh users list

> To: zsh-users@sunsite.dk (Zsh users list)
> Subject: Re: _normal:26: bad math expression: operator expected at `0 ' 
> Date: Thu, 25 Apr 2002 16:00:53 +0100
> From: Peter Stephenson <pws@csr.com>
> 
> Roman Neuhauser wrote:
> > roman@roman ~ > echo $ZSH_VERSION                                      124:0
> > 4.0.4
> >
> > So, is 4.0.4 not a stable version?
> 
> Check your $fpath to see if it's possibly picking up other versions of
> the function.

I don't think that's possible. 4.0.4 is the only version that this box
has ever seen:

roman@roman ~ > echo $fpath                                               133:0
/usr/local/share/zsh/site-functions /usr/local/share/zsh/4.0.4/functions
roman@roman ~ > for dir in $fpath; do ls $dir/_normal 2>/dev/null; done   134:0
/usr/local/share/zsh/4.0.4/functions/_normal
roman@roman ~ >                                                           135:0

> It's hard to see how this problem can occur in 4.0.4, unless there's
> some additional option we should be setting for compatibility in the
> list given by $_comp_options.  If it really is the function from 4.0.4,
> try running `emulate zsh' before starting and using the new completion
> system.  If it works after that, it would help if you send a list of
> options you've got set.

    You've nailed it down, thanks! Let me know if you need anything else.

    roman@roman ~ > setopt                                        107:0
    autocd
    nobeep
    cbases
    noclobber
    completeinword
    correct
    cshjunkiehistory
    cshjunkieloops
    extendedhistory
    histignoredups
    histnostore
    histreduceblanks
    histverify
    incappendhistory
    interactive
    interactivecomments
    nolistambiguous
    listpacked
    longlistjobs
    monitor
    octalzeroes
    pathdirs
    pushdignoredups
    shinstdin
    zle
    roman@roman ~ >                                               108:0

-- 
FreeBSD 4.4-STABLE
5:30PM up 10 days, 6:43, 14 users, load averages: 0.26, 0.17, 0.16


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: _normal:26: bad math expression: operator expected at `0 '
  2002-04-25 15:32         ` Peter Stephenson
@ 2002-04-25 15:57           ` Roman Neuhauser
  0 siblings, 0 replies; 7+ messages in thread
From: Roman Neuhauser @ 2002-04-25 15:57 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh users list

> To: zsh-users@sunsite.dk (Zsh users list)
> Subject: Re: _normal:26: bad math expression: operator expected at `0 ' 
> Date: Thu, 25 Apr 2002 16:32:03 +0100
> From: Peter Stephenson <pws@csr.com>
> 
> Roman Neuhauser wrote:
> >     You've nailed it down, thanks! Let me know if you need anything else.
> > 
> >     roman@roman ~ > setopt                                        107:0
> >...
> >     octalzeroes
> >...
> 
> This is the one.  I think this applies cleanly to 4.0, but it's obvious
> how to do it by hand anyway.
> 
> You can fix it simply by editing the installed compinit to add
> NO_octalzeroes to _comp_options.

    Done that, and now I'm really impressed. :)
    BTW, I wanted to thank to everybody for this great piece of
    software. zsh has changed my life. :)

-- 
FreeBSD 4.4-STABLE
5:55PM up 10 days, 7:08, 13 users, load averages: 0.15, 0.19, 0.17


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-04-25 15:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-25 14:26 _normal:26: bad math expression: operator expected at `0 ' Roman Neuhauser
2002-04-25 14:29 ` Sven Wischnowsky
2002-04-25 15:06   ` Roman Neuhauser
2002-04-25 15:00     ` Peter Stephenson
2002-04-25 15:38       ` Roman Neuhauser
2002-04-25 15:32         ` Peter Stephenson
2002-04-25 15:57           ` Roman Neuhauser

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).