zsh-workers
 help / color / mirror / code / Atom feed
* Re: completion killing zsh
@ 1999-09-06 12:18 Sven Wischnowsky
  0 siblings, 0 replies; 3+ messages in thread
From: Sven Wischnowsky @ 1999-09-06 12:18 UTC (permalink / raw)
  To: zsh-workers


Timothy J Luoma wrote:

> Don't ask me why, but when I try this completion (ie: I hit 'tab' after  
> 'ivvvv' below) zsh dies:
> 
> (zsh = 3.1.5-pws-20)
> 
> (gdb) run
> Starting program: /usr/bin/zsh
> # appnmail -ivvvv Program generated(1): Memory access exception on address  
> 0x2f (protection failure).
> 0x36d45 in ?? ()
> (gdb)

I can't help you with this either. Sorry.

> here's the reply function "allmbox" :
> 
> allmbox ()
>    {
>    if [[ $mboxs = "" ]]
>    then
>    	mboxs=(`find ~/Mailboxes/ -type d -name '*.mbox' -print`);

Any reason for not using `~/Mailboxes/**/*.mbox(/)'?

>    fi
>    reply=$mboxs;
>    }

This should be `reply=( $mboxs )'.

> what am I doing wrong here?
> 
> is it a buffer overflow maybe?
> 
> # find ~/Mailboxes/ -type d -name '*.mbox' -print|wc
>     177     177   11536

No. 177 matches is nothing.


Bart Schaefer wrote:

> This message looks very familiar, but I can't figure out how to search
> for the similar one.  Didn't someone else some months ago ask about a
> compctl that had 'S[-]' just sort of floating out there like this?

It's zsh-users:23(08|09|10) -- but without a SEGV.


Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


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

* Re: completion killing zsh
  1999-09-04  2:06 Timothy J Luoma
@ 1999-09-04  9:29 ` Bart Schaefer
  0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 1999-09-04  9:29 UTC (permalink / raw)
  To: Timothy J Luoma, zsh-workers

On Sep 3, 10:06pm, Timothy J Luoma wrote:
} Subject: completion killing zsh
}
} Don't ask me why, but [...]

This message looks very familiar, but I can't figure out how to search
for the similar one.  Didn't someone else some months ago ask about a
compctl that had 'S[-]' just sort of floating out there like this?

} compctl -K allmbox  'S[-]' -- compactmail appnmail

Is there an example somewhere on which you based this attempt, that you
can point us to so we can fix it?  More specifically, what gave you the
idea that 'S[-]' would be useful without the -x option?

} when I try this completion (ie: I hit 'tab' after  
} 'ivvvv' below) zsh dies:
} 
} (zsh = 3.1.5-pws-20)

That release is from early June.  There have been at least 60 patches to
zle_tricky.c alone, since then.  The first thing you need to do is grab
at least 3.1.6 from ftp.zsh.org.

} compctl -K allmbox  'S[-]' -- compactmail appnmail
} 
} what am I doing wrong here?

The allmbox function is fine, but that comptl is the same as

	compctl -K allmbox - --
	compctl -K allmbox 'S[-]'
	compctl -K allmbox appnmail
	compctl -K allmbox compactmail

That is, the 'S[-]' and the '--' are being taken as command names.  The
pattern forms like S[-] are only interpreted following a -x option.
That still shouldn't cause a crash (and probably is not a factor), but
it's not doing any good there.

You might have meant something like

    compctl -K allmbox -x 'S[-]' -k '(-i -v)' -- appnmail compactmail

Which means, "complete using the allmbox function UNLESS the current
word starts with '-', in which case complete from the array (-i -v),"
but I don't know quite what you were trying to accomplish.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


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

* completion killing zsh
@ 1999-09-04  2:06 Timothy J Luoma
  1999-09-04  9:29 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Timothy J Luoma @ 1999-09-04  2:06 UTC (permalink / raw)
  To: zsh-workers


Don't ask me why, but when I try this completion (ie: I hit 'tab' after  
'ivvvv' below) zsh dies:

(zsh = 3.1.5-pws-20)



(gdb) run
Starting program: /usr/bin/zsh
# appnmail -ivvvv Program generated(1): Memory access exception on address  
0x2f (protection failure).
0x36d45 in ?? ()
(gdb)

here's the completion:

compctl -K allmbox  'S[-]' -- compactmail appnmail


here's the reply function "allmbox" :

allmbox ()
   {
   if [[ $mboxs = "" ]]
   then
   	mboxs=(`find ~/Mailboxes/ -type d -name '*.mbox' -print`);
   fi
   reply=$mboxs;
   }


what am I doing wrong here?

is it a buffer overflow maybe?

# find ~/Mailboxes/ -type d -name '*.mbox' -print|wc
    177     177   11536



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

end of thread, other threads:[~1999-09-06 12:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-06 12:18 completion killing zsh Sven Wischnowsky
  -- strict thread matches above, loose matches on Subject: below --
1999-09-04  2:06 Timothy J Luoma
1999-09-04  9:29 ` Bart Schaefer

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