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