Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: Re: PATCH: for Re: REC_EXACT and AUTO_MENU, and compctl -U too



On Jun 22,  8:45am, Sven Wischnowsky wrote:
} Subject: PATCH: for Re:  REC_EXACT and AUTO_MENU, and compctl -U too
}
} Sounds very reasonable. And if we want to do it in the drastic way you
} described, the patch is pretty simple.

There's a missing blank line in Sven's patch, which causes it to fail.
The corrected patch follows.

*** Src/Zle/zle_tricky.c.old	Mon Jun 22 08:23:18 1998
--- Src/Zle/zle_tricky.c	Mon Jun 22 08:26:36 1998
***************
*** 2246,2252 ****
  {
      Compctl cc = NULL;
      int oloffs = offs, owe = we, owb = wb, ocs = cs, oll = ll, isf = 1;
!     int t, sf1, sf2, ooffs;
      char *p, *sd = NULL, *tt, *s1, *s2, *os = NULL;
      unsigned char *ol = NULL;
  
--- 2246,2252 ----
  {
      Compctl cc = NULL;
      int oloffs = offs, owe = we, owb = wb, ocs = cs, oll = ll, isf = 1;
!     int t, sf1, sf2, ooffs, um = usemenu;
      char *p, *sd = NULL, *tt, *s1, *s2, *os = NULL;
      unsigned char *ol = NULL;
  
***************
*** 2266,2271 ****
--- 2266,2272 ----
      if (unset(COMPLETEINWORD) && cs != we)
  	cs = we, offs = strlen(s);
  
+     usemenu = um;
      ispattern = haswhat = lastambig = 0;
      patcomp = filecomp = NULL;
      menucur = NULL;
***************
*** 2413,2418 ****
--- 2414,2420 ----
  	*delit = 1;
  	*s = '\0';
  	offs = 0;
+ 	if (isset(AUTOMENU)) usemenu = 1;
      } else
  	*delit = 0;

*** Doc/Zsh/compctl.yo.old	Mon Jun 22 08:36:59 1998
--- Doc/Zsh/compctl.yo	Mon Jun 22 08:42:43 1998
***************
*** 353,359 ****
  tt(-K) option) which can examine the word components passed to it
  (or via the tt(read) builtin's tt(-c) and tt(-l) flags) and
  use its own criteria to decide what matches.  If there is no
! completion, the original word is retained.
  )
  item(tt(-y) var(func-or-var))(
  The list provided by var(func-or-var) is displayed instead of the list
--- 353,362 ----
  tt(-K) option) which can examine the word components passed to it
  (or via the tt(read) builtin's tt(-c) and tt(-l) flags) and
  use its own criteria to decide what matches.  If there is no
! completion, the original word is retained.  Since the produced 
! possible completions seldom seldom have interesting common prefixes
! and suffixes, menucompletion is started immediatly if tt(AUTO_MENU) is
! set and this flag is used.
  )
  item(tt(-y) var(func-or-var))(
  The list provided by var(func-or-var) is displayed instead of the list

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



Messages sorted by: Reverse Date, Date, Thread, Author