zsh-workers
 help / color / mirror / code / Atom feed
* setopt globcomplete screws up accept-and-menu-complete
@ 1996-07-16  6:05 Bart Schaefer
  1996-07-28 21:45 ` Zoltan Hidvegi
  0 siblings, 1 reply; 2+ messages in thread
From: Bart Schaefer @ 1996-07-16  6:05 UTC (permalink / raw)
  To: zsh-workers

automenu            on
completealiases     off
completeinword      on
globcomplete        on
menucomplete        off

"^X^I"  accept-and-menu-complete

zagzig<1> echo $ZSH_VERSION
3.0-pre3
zagzig<2> ls -l z*<TAB><TAB>
zagzig<2> ls -l zle_bindings.c<C-x><TAB>
zagzig<2> ls -l zle_bindings.c z*zle_bindings.pro
ls: z*zle_bindings.pro: No such file or directory

Incidentally, 3.0-pre2 behaves slightly differently:

zagzig[72] ls -l z*<TAB><TAB>
zagzig[72] ls -l zle_bindings.c<C-x><TAB>
zagzig[72] ls -l zle_bindings.c z\*zle_bindings.pro

The following seems to fix acceptandmenucomplete() in pre3.  Am I off base?

*** zsh-3.0-pre3/Src/zle_tricky.c	Mon Jul 15 00:07:23 1996
--- zsh-3.0-pre3-work/Src/zle_tricky.c	Mon Jul 15 22:46:49 1996
***************
*** 353,359 ****
      inststrlen(" ", 1, 1);
      if (qparampre)
  	inststrlen(qparampre, 1, qparprelen);
!     if (lpre)
  	inststrlen(lpre, 1, -1);
      if (lsuf)
  	inststrlen(lsuf, 0, -1);
--- 353,359 ----
      inststrlen(" ", 1, 1);
      if (qparampre)
  	inststrlen(qparampre, 1, qparprelen);
!     if (lpre && (unset(GLOBCOMPLETE) || !hasspecial(lpre)))
  	inststrlen(lpre, 1, -1);
      if (lsuf)
  	inststrlen(lsuf, 0, -1);
***************

-- 
Bart Schaefer                             Brass Lantern Enterprises
http://www.well.com/user/barts            http://www.nbn.com/people/lantern

New male in /home/schaefer:
>N  2 Justin William Schaefer  Sat May 11 03:43  53/4040  "Happy Birthday"



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

* Re: setopt globcomplete screws up accept-and-menu-complete
  1996-07-16  6:05 setopt globcomplete screws up accept-and-menu-complete Bart Schaefer
@ 1996-07-28 21:45 ` Zoltan Hidvegi
  0 siblings, 0 replies; 2+ messages in thread
From: Zoltan Hidvegi @ 1996-07-28 21:45 UTC (permalink / raw)
  To: schaefer; +Cc: zsh-workers

Bart wrote:
> automenu            on
> completealiases     off
> completeinword      on
> globcomplete        on
> menucomplete        off
> 
> "^X^I"  accept-and-menu-complete

[...]

> zagzig[72] ls -l z*<TAB><TAB>
> zagzig[72] ls -l zle_bindings.c<C-x><TAB>
> zagzig[72] ls -l zle_bindings.c z\*zle_bindings.pro

The fix is included below.

Zoltan


--- zle_tricky.c	1996/07/28 21:09:40	2.68
+++ zle_tricky.c	1996/07/28 21:33:16
@@ -353,9 +353,9 @@
     inststrlen(" ", 1, 1);
     if (qparampre)
 	inststrlen(qparampre, 1, qparprelen);
-    if (lpre)
+    if (lpre && !ispattern)
 	inststrlen(lpre, 1, -1);
-    if (lsuf)
+    if (lsuf && !ispattern)
 	inststrlen(lsuf, 0, -1);
     menupos = cs;
     menuend = cs + (lsuf ? strlen(lsuf) : 0);


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

end of thread, other threads:[~1996-07-28 22:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-07-16  6:05 setopt globcomplete screws up accept-and-menu-complete Bart Schaefer
1996-07-28 21:45 ` Zoltan Hidvegi

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