zsh-workers
 help / color / mirror / code / Atom feed
* problem with multicomp
@ 1996-08-02 17:04 Carlos Carvalho
  1996-08-02 18:16 ` Zoltan Hidvegi
  0 siblings, 1 reply; 6+ messages in thread
From: Carlos Carvalho @ 1996-08-02 17:04 UTC (permalink / raw)
  To: zsh-workers

With pre5, I get this:

zsh%  cd mem/7/ar
zsh: sofar[2]: parameter not set

Also, I have autocd enabled, but multicomp doesn't get invoked when
press TAB.

On another issue, I missed the explanation about nocorrect now being a
builtin. Why is this so? This is inconsistent. The other modifiers
should then also be builtins. Also, if you use "noglob nocorrect etc."
it doesn't work, you have to do "nocorrect noglob etc.". I think it
should work, because noglob should work with anything, including
nocorrect.

Carlos


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

* Re: problem with multicomp
  1996-08-02 17:04 problem with multicomp Carlos Carvalho
@ 1996-08-02 18:16 ` Zoltan Hidvegi
  1996-08-02 18:19   ` Zoltan Hidvegi
  1996-08-02 21:05   ` Carlos Carvalho
  0 siblings, 2 replies; 6+ messages in thread
From: Zoltan Hidvegi @ 1996-08-02 18:16 UTC (permalink / raw)
  To: Carlos Carvalho; +Cc: zsh-workers

> With pre5, I get this:
> 
> zsh%  cd mem/7/ar
> zsh: sofar[2]: parameter not set

I'm sure that you set the nounset option.  Try the patch below to
multicomp.  One may say that it is a bug to that nounset gives an error
message when subscript is out of range bug as I know zsh always did that.
The oldest version I have is zsh-2.6-beta13-hzoli13 does this.

> Also, I have autocd enabled, but multicomp doesn't get invoked when
> press TAB.

Because multicomp does not work on words in command position I think.
compctl -C should be used for that.  See zshcompctl(1).

> On another issue, I missed the explanation about nocorrect now being a
> builtin. Why is this so? This is inconsistent. The other modifiers
> should then also be builtins. Also, if you use "noglob nocorrect etc."
> it doesn't work, you have to do "nocorrect noglob etc.". I think it
> should work, because noglob should work with anything, including
> nocorrect.

nocorrect is a reserved word and the other prefixes are builtins.
nocorrect must be recognized when parsing the input since spelling
correction is done during parsing so it cannot be a builtin.  Reserved
words are only recognized in command position or after other reserved words
(well I oversimplificated it) that's why noroccect must come before the
other modifiers.  For the parser noglob is the same as echo so if
echo nocorrect does not work, noglob nocorrect will not work either.  The
only way to change this is to make the other prefixes reserved words but
that would mean that foo=exec ; $foo something will not work.

Zoltan


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

* Re: problem with multicomp
  1996-08-02 18:16 ` Zoltan Hidvegi
@ 1996-08-02 18:19   ` Zoltan Hidvegi
  1996-08-02 21:05   ` Carlos Carvalho
  1 sibling, 0 replies; 6+ messages in thread
From: Zoltan Hidvegi @ 1996-08-02 18:19 UTC (permalink / raw)
  To: Zoltan Hidvegi; +Cc: carlos, zsh-workers

> I'm sure that you set the nounset option.  Try the patch below to
> multicomp.  One may say that it is a bug to that nounset gives an error
> message when subscript is out of range bug as I know zsh always did that.
> The oldest version I have is zsh-2.6-beta13-hzoli13 does this.

I forgot the patch.  Here it is.

Zoltan


--- Functions/multicomp	1996/05/02 22:57:04	2.0
+++ Functions/multicomp	1996/08/02 17:36:08
@@ -16,7 +16,7 @@
 
 local pref head sofar origtop newtop globdir="(-/)" wild
 setopt localoptions nullglob rcexpandparam globdots
-unsetopt markdirs globsubst shwordsplit
+unsetopt markdirs globsubst shwordsplit nounset
 
 pref="${1}$2"
 # Hack to allow programmable completion to select multicomp after a :


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

* Re: problem with multicomp
  1996-08-02 21:05   ` Carlos Carvalho
@ 1996-08-02 19:21     ` Zoltan Hidvegi
  1996-08-02 19:45     ` Zefram
  1 sibling, 0 replies; 6+ messages in thread
From: Zoltan Hidvegi @ 1996-08-02 19:21 UTC (permalink / raw)
  To: Carlos Carvalho; +Cc: zsh-workers

> Zoltan Hidvegi (hzoli@cs.elte.hu) wrote on 2 August 1996 20:16:
>  >I'm sure that you set the nounset option.
> 
> Yes, this is the problem. Thanks. HOWEVER, if I do setopt|grep set it
> doesn't appear!! I haven't really followed the details of the NO_
> changes to the options, but if you're required to say setopt nounset
> for it to work, it should appear in setopt's listing.

setopt nounset is the same as unsetopt unset.  Try unsetopt|grep unset.

Zoltan


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

* Re: problem with multicomp
  1996-08-02 21:05   ` Carlos Carvalho
  1996-08-02 19:21     ` Zoltan Hidvegi
@ 1996-08-02 19:45     ` Zefram
  1 sibling, 0 replies; 6+ messages in thread
From: Zefram @ 1996-08-02 19:45 UTC (permalink / raw)
  To: Carlos Carvalho; +Cc: zsh-workers

>Yes, this is the problem. Thanks. HOWEVER, if I do setopt|grep set it
>doesn't appear!!

The correct way to check for an option being set is `[[ -o name ]]`.
`[[ -o nounset ]]` still works, and means exactly the same thing it
used to.

-zefram


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

* Re: problem with multicomp
  1996-08-02 18:16 ` Zoltan Hidvegi
  1996-08-02 18:19   ` Zoltan Hidvegi
@ 1996-08-02 21:05   ` Carlos Carvalho
  1996-08-02 19:21     ` Zoltan Hidvegi
  1996-08-02 19:45     ` Zefram
  1 sibling, 2 replies; 6+ messages in thread
From: Carlos Carvalho @ 1996-08-02 21:05 UTC (permalink / raw)
  To: zsh-workers

Zoltan Hidvegi (hzoli@cs.elte.hu) wrote on 2 August 1996 20:16:
 >I'm sure that you set the nounset option.

Yes, this is the problem. Thanks. HOWEVER, if I do setopt|grep set it
doesn't appear!! I haven't really followed the details of the NO_
changes to the options, but if you're required to say setopt nounset
for it to work, it should appear in setopt's listing.

 >nocorrect is a reserved word and the other prefixes are builtins.

Convincing.

Carlos


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

end of thread, other threads:[~1996-08-02 20:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-08-02 17:04 problem with multicomp Carlos Carvalho
1996-08-02 18:16 ` Zoltan Hidvegi
1996-08-02 18:19   ` Zoltan Hidvegi
1996-08-02 21:05   ` Carlos Carvalho
1996-08-02 19:21     ` Zoltan Hidvegi
1996-08-02 19:45     ` Zefram

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).