Karsten Hopp 038507
To: vim-dev@vim.org
Karsten Hopp 038507
Subject: Patch 7.1.199
Karsten Hopp 038507
Fcc: outbox
Karsten Hopp 038507
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 038507
Mime-Version: 1.0
Karsten Hopp 038507
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 038507
Content-Transfer-Encoding: 8bit
Karsten Hopp 038507
------------
Karsten Hopp 038507
Karsten Hopp 038507
Patch 7.1.199
Karsten Hopp 038507
Problem:    Can't do command line completion for a specific file name
Karsten Hopp 038507
	    extension.
Karsten Hopp 038507
Solution:   When the pattern ends in "$" don't add a star for completion and
Karsten Hopp 038507
	    remove the "$" before matching with file names.
Karsten Hopp 038507
Files:	    runtime/doc/cmdline.txt, src/ex_getln.c
Karsten Hopp 038507
Karsten Hopp 038507
Karsten Hopp 038507
*** ../vim-7.1.198/runtime/doc/cmdline.txt	Sat May 12 15:38:39 2007
Karsten Hopp 038507
--- runtime/doc/cmdline.txt	Fri Jan  4 15:13:06 2008
Karsten Hopp 038507
***************
Karsten Hopp 038507
*** 1,4 ****
Karsten Hopp 038507
! *cmdline.txt*   For Vim version 7.1.  Last change: 2006 Jul 18
Karsten Hopp 038507
  
Karsten Hopp 038507
  
Karsten Hopp 038507
  		  VIM REFERENCE MANUAL    by Bram Moolenaar
Karsten Hopp 038507
--- 1,4 ----
Karsten Hopp 038507
! *cmdline.txt*   For Vim version 7.1.  Last change: 2008 Jan 04
Karsten Hopp 038507
  
Karsten Hopp 038507
  
Karsten Hopp 038507
  		  VIM REFERENCE MANUAL    by Bram Moolenaar
Karsten Hopp 038507
***************
Karsten Hopp 038507
*** 316,322 ****
Karsten Hopp 038507
  command-line is shown.  (Note: the shifted arrow keys do not work on all
Karsten Hopp 038507
  terminals)
Karsten Hopp 038507
  
Karsten Hopp 038507
! 							*his* *:history*
Karsten Hopp 038507
  :his[tory]	Print the history of last entered commands.
Karsten Hopp 038507
  		{not in Vi}
Karsten Hopp 038507
  		{not available when compiled without the |+cmdline_hist|
Karsten Hopp 038507
--- 316,322 ----
Karsten Hopp 038507
  command-line is shown.  (Note: the shifted arrow keys do not work on all
Karsten Hopp 038507
  terminals)
Karsten Hopp 038507
  
Karsten Hopp 038507
! 							*:his* *:history*
Karsten Hopp 038507
  :his[tory]	Print the history of last entered commands.
Karsten Hopp 038507
  		{not in Vi}
Karsten Hopp 038507
  		{not available when compiled without the |+cmdline_hist|
Karsten Hopp 038507
***************
Karsten Hopp 038507
*** 447,452 ****
Karsten Hopp 038507
--- 447,457 ----
Karsten Hopp 038507
  
Karsten Hopp 038507
  To completely ignore files with some extension use 'wildignore'.
Karsten Hopp 038507
  
Karsten Hopp 038507
+ To match only files that end at the end of the typed text append a "$".  For
Karsten Hopp 038507
+ example, to match only files that end in ".c": >
Karsten Hopp 038507
+ 	:e *.c$
Karsten Hopp 038507
+ This will not match a file ending in ".cpp".  Without the "$" it does match.
Karsten Hopp 038507
+ 
Karsten Hopp 038507
  The old value of an option can be obtained by hitting 'wildchar' just after
Karsten Hopp 038507
  the '='.  For example, typing 'wildchar' after ":set dir=" will insert the
Karsten Hopp 038507
  current value of 'dir'.  This overrules file name completion for the options
Karsten Hopp 038507
*** ../vim-7.1.198/src/ex_getln.c	Wed Jan  2 21:54:33 2008
Karsten Hopp 038507
--- src/ex_getln.c	Fri Jan  4 15:05:31 2008
Karsten Hopp 038507
***************
Karsten Hopp 038507
*** 4078,4083 ****
Karsten Hopp 038507
--- 4078,4084 ----
Karsten Hopp 038507
  	     * ~ would be at the start of the file name, but not the tail.
Karsten Hopp 038507
  	     * $ could be anywhere in the tail.
Karsten Hopp 038507
  	     * ` could be anywhere in the file name.
Karsten Hopp 038507
+ 	     * When the name ends in '$' don't add a star, remove the '$'.
Karsten Hopp 038507
  	     */
Karsten Hopp 038507
  	    tail = gettail(retval);
Karsten Hopp 038507
  	    if ((*retval != '~' || tail != retval)
Karsten Hopp 038507
***************
Karsten Hopp 038507
*** 4085,4090 ****
Karsten Hopp 038507
--- 4086,4093 ----
Karsten Hopp 038507
  		    && vim_strchr(tail, '$') == NULL
Karsten Hopp 038507
  		    && vim_strchr(retval, '`') == NULL)
Karsten Hopp 038507
  		retval[len++] = '*';
Karsten Hopp 038507
+ 	    else if (len > 0 && retval[len - 1] == '$')
Karsten Hopp 038507
+ 		--len;
Karsten Hopp 038507
  	    retval[len] = NUL;
Karsten Hopp 038507
  	}
Karsten Hopp 038507
      }
Karsten Hopp 038507
*** ../vim-7.1.198/src/version.c	Fri Jan  4 14:52:14 2008
Karsten Hopp 038507
--- src/version.c	Fri Jan  4 15:14:29 2008
Karsten Hopp 038507
***************
Karsten Hopp 038507
*** 668,669 ****
Karsten Hopp 038507
--- 668,671 ----
Karsten Hopp 038507
  {   /* Add new patch number below this line */
Karsten Hopp 038507
+ /**/
Karsten Hopp 038507
+     199,
Karsten Hopp 038507
  /**/
Karsten Hopp 038507
Karsten Hopp 038507
-- 
Karsten Hopp 038507
ARTHUR:  Well, I can't just call you `Man'.
Karsten Hopp 038507
DENNIS:  Well, you could say `Dennis'.
Karsten Hopp 038507
ARTHUR:  Well, I didn't know you were called `Dennis.'
Karsten Hopp 038507
DENNIS:  Well, you didn't bother to find out, did you?
Karsten Hopp 038507
                                  The Quest for the Holy Grail (Monty Python)
Karsten Hopp 038507
Karsten Hopp 038507
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 038507
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 038507
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 038507
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///