]>
Commit | Line | Data |
---|---|---|
d2415672 AG |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 7.1.199 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=ISO-8859-1 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.1.199 | |
11 | Problem: Can't do command line completion for a specific file name | |
12 | extension. | |
13 | Solution: When the pattern ends in "$" don't add a star for completion and | |
14 | remove the "$" before matching with file names. | |
15 | Files: runtime/doc/cmdline.txt, src/ex_getln.c | |
16 | ||
17 | ||
18 | *** ../vim-7.1.198/runtime/doc/cmdline.txt Sat May 12 15:38:39 2007 | |
19 | --- runtime/doc/cmdline.txt Fri Jan 4 15:13:06 2008 | |
20 | *************** | |
21 | *** 1,4 **** | |
22 | ! *cmdline.txt* For Vim version 7.1. Last change: 2006 Jul 18 | |
23 | ||
24 | ||
25 | VIM REFERENCE MANUAL by Bram Moolenaar | |
26 | --- 1,4 ---- | |
27 | ! *cmdline.txt* For Vim version 7.1. Last change: 2008 Jan 04 | |
28 | ||
29 | ||
30 | VIM REFERENCE MANUAL by Bram Moolenaar | |
31 | *************** | |
32 | *** 316,322 **** | |
33 | command-line is shown. (Note: the shifted arrow keys do not work on all | |
34 | terminals) | |
35 | ||
36 | ! *his* *:history* | |
37 | :his[tory] Print the history of last entered commands. | |
38 | {not in Vi} | |
39 | {not available when compiled without the |+cmdline_hist| | |
40 | --- 316,322 ---- | |
41 | command-line is shown. (Note: the shifted arrow keys do not work on all | |
42 | terminals) | |
43 | ||
44 | ! *:his* *:history* | |
45 | :his[tory] Print the history of last entered commands. | |
46 | {not in Vi} | |
47 | {not available when compiled without the |+cmdline_hist| | |
48 | *************** | |
49 | *** 447,452 **** | |
50 | --- 447,457 ---- | |
51 | ||
52 | To completely ignore files with some extension use 'wildignore'. | |
53 | ||
54 | + To match only files that end at the end of the typed text append a "$". For | |
55 | + example, to match only files that end in ".c": > | |
56 | + :e *.c$ | |
57 | + This will not match a file ending in ".cpp". Without the "$" it does match. | |
58 | + | |
59 | The old value of an option can be obtained by hitting 'wildchar' just after | |
60 | the '='. For example, typing 'wildchar' after ":set dir=" will insert the | |
61 | current value of 'dir'. This overrules file name completion for the options | |
62 | *** ../vim-7.1.198/src/ex_getln.c Wed Jan 2 21:54:33 2008 | |
63 | --- src/ex_getln.c Fri Jan 4 15:05:31 2008 | |
64 | *************** | |
65 | *** 4078,4083 **** | |
66 | --- 4078,4084 ---- | |
67 | * ~ would be at the start of the file name, but not the tail. | |
68 | * $ could be anywhere in the tail. | |
69 | * ` could be anywhere in the file name. | |
70 | + * When the name ends in '$' don't add a star, remove the '$'. | |
71 | */ | |
72 | tail = gettail(retval); | |
73 | if ((*retval != '~' || tail != retval) | |
74 | *************** | |
75 | *** 4085,4090 **** | |
76 | --- 4086,4093 ---- | |
77 | && vim_strchr(tail, '$') == NULL | |
78 | && vim_strchr(retval, '`') == NULL) | |
79 | retval[len++] = '*'; | |
80 | + else if (len > 0 && retval[len - 1] == '$') | |
81 | + --len; | |
82 | retval[len] = NUL; | |
83 | } | |
84 | } | |
85 | *** ../vim-7.1.198/src/version.c Fri Jan 4 14:52:14 2008 | |
86 | --- src/version.c Fri Jan 4 15:14:29 2008 | |
87 | *************** | |
88 | *** 668,669 **** | |
89 | --- 668,671 ---- | |
90 | { /* Add new patch number below this line */ | |
91 | + /**/ | |
92 | + 199, | |
93 | /**/ | |
94 | ||
95 | -- | |
96 | ARTHUR: Well, I can't just call you `Man'. | |
97 | DENNIS: Well, you could say `Dennis'. | |
98 | ARTHUR: Well, I didn't know you were called `Dennis.' | |
99 | DENNIS: Well, you didn't bother to find out, did you? | |
100 | The Quest for the Holy Grail (Monty Python) | |
101 | ||
102 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
103 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
104 | \\\ download, build and distribute -- http://www.A-A-P.org /// | |
105 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |