* zsh-3.1.x cdmatch problem
@ 1998-11-01 23:46 Paul Lew
1998-11-02 0:58 ` Bart Schaefer
0 siblings, 1 reply; 3+ messages in thread
From: Paul Lew @ 1998-11-01 23:46 UTC (permalink / raw)
To: zsh-workers
I am trying switch from 3.0.x to 3.1.x but one problem is really
bugged me: The completion after 'cd' command generated:
zsh: bad math expression: unbalanced stack
This does not happen for 3.0.x, the function cdmatch is the one from
standard distribution:
(3)ezdzit lew Src>>> function cdmatch {
emulate -R zsh
setopt localoptions
local narg pref cdp
read -nc narg
read -Ac pref
cdp=(. $cdpath)
reply=(${^cdp}/${pref[$narg]%$2}*$2(-/DN^M:t))
return
}
If I get rid of the reply= line, the error message disappeared but
there is also no reply list for the completion.
Any idea what wrong here? Thanks in advance.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: zsh-3.1.x cdmatch problem
1998-11-01 23:46 zsh-3.1.x cdmatch problem Paul Lew
@ 1998-11-02 0:58 ` Bart Schaefer
1998-11-02 2:06 ` Paul Lew
0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 1998-11-02 0:58 UTC (permalink / raw)
To: Paul Lew, zsh-workers
On Nov 1, 6:46pm, Paul Lew wrote:
} Subject: zsh-3.1.x cdmatch problem
}
} I am trying switch from 3.0.x to 3.1.x but one problem is really
} bugged me: The completion after 'cd' command generated:
}
} zsh: bad math expression: unbalanced stack
}
} This does not happen for 3.0.x, the function cdmatch is the one from
} standard distribution:
The cdmatch function you quoted is not the one from the standard 3.1.[45]
distribution, but in any case I don't see this error for any completion
that I attempted (even after I fixed cdmatch2, see my other posting).
It would help if you told us:
(1) Exactly what `x' you mean when you say 3.1.x;
(2) A specific example completion that produces this result.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: zsh-3.1.x cdmatch problem
1998-11-02 0:58 ` Bart Schaefer
@ 1998-11-02 2:06 ` Paul Lew
0 siblings, 0 replies; 3+ messages in thread
From: Paul Lew @ 1998-11-02 2:06 UTC (permalink / raw)
To: Bart Schaefer; +Cc: Paul Lew, zsh-workers
>>>>> "Bart" == Bart Schaefer <schaefer@brasslantern.com> writes:
Bart> On Nov 1, 6:46pm, Paul Lew wrote:
Bart> } Subject: zsh-3.1.x cdmatch problem
Bart> }
Bart> } I am trying switch from 3.0.x to 3.1.x but one problem is
Bart> } really bugged me: The completion after 'cd' command
Bart> } generated:
Bart> }
Bart> } zsh: bad math expression: unbalanced stack
Bart> }
Bart> } This does not happen for 3.0.x, the function cdmatch is
Bart> } the one from standard distribution:
Bart> The cdmatch function you quoted is not the one from the
Bart> standard 3.1.[45] distribution, but in any case I don't see
Bart> this error for any completion that I attempted (even after I
Bart> fixed cdmatch2, see my other posting).
This is the result of entering 'functions cdmatch', the comments were
removed. The date of the file from zsh-3.1.5/Functions is:
(3)ezdzit lew Src>>> ls -l cdmatch
-rwxr-xr-x 1 lew users 709 May 11 1997 cdmatch
(3)ezdzit lew Src>>> sum cdmatch
58242 1 cdmatch
Seems this file has not changed since May 11 1977. Could you tell me
what you get when you enter 'functions cdmatch'?
Bart> It would help if you told us:
Bart> (1) Exactly what `x' you mean when you say 3.1.x;
Make it simple, 3.1.5 (with no patch applied).
Bart> (2) A specific example completion that produces this result.
$ tar xf zsh-3.1.5.tar.gz
$ cd zsh-3.1.5/Src
$ cd <TAB>
My cdpath value is: (. .. /usr/users/lew), unsetting it make no
difference.
OS: Digital UNIX 3.2c
Compiler: gcc -v
Reading specs from /usr/local/lib/gcc-lib/alpha-dec-osf3.2/egcs-2.90.29/specs
gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1998-11-02 2:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-11-01 23:46 zsh-3.1.x cdmatch problem Paul Lew
1998-11-02 0:58 ` Bart Schaefer
1998-11-02 2:06 ` Paul Lew
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).