20 Commits

Author SHA1 Message Date
Ingo Karkat 383183c91f ENH: Allow Funcref for a:parameters.wildignore, too 2023-05-15 16:59:45 +02:00
Ingo Karkat 1bb08b5061 ENH: Allow Funcref for a:parameters.browsefilter, too 2023-05-15 16:57:27 +02:00
Ingo Karkat 22e8d52bdb Also extract the bang, count, and mods when completing 2023-05-15 16:28:22 +02:00
Ingo Karkat 635e21759c ingo#plugin#cmdcomplete#dirforaction: ENH: Allow passing of 'commandAttributes': '-count' 2023-05-15 15:55:23 +02:00
Ingo Karkat 39b0592b8d dirforaction: ENH: Add a:parameters.completeFunctionHook 2021-03-16 13:50:11 +01:00
Ingo Karkat 1b6002acd0 dirforaction: BUG: Passed filenames with escaped glob characters not handled correctly; need to use the unescaped filename for l:isAbsoluteFilename check 2021-03-10 19:35:28 +01:00
Ingo Karkat 4196829a5b Refactoring: Minor: Define l:unescapedFilename also when l:filename is set and reuse the variable for s:ResolveDirspecs() 2021-03-10 19:34:45 +01:00
Ingo Karkat 4f4fddf81b ingo#plugin#cmdcomplete#dirforaction#setup(): Compatibility: Avoid "E693: Can only compare Funcref with Funcref"
Does not happen with Vim 7.4.1689, but seen in 7.4.629.
2020-06-12 10:49:59 +02:00
Ingo Karkat 58a403d030 ENH: Use special completion that only returns directories if a:parameters.action is "chdir"
This allows to define commands like :FooCd and have that only offer directories for completion (assuming that a:isAllowOtherDirs and/or a:isIncludeSubdirs are set).
2020-03-03 22:08:12 +01:00
Ingo Karkat f9b0b5b879 Refactoring: Add a:isReturnRawFilespecs to s:CompleteFiles()
To be able to obtain the raw (i.e. without s:RemoveDirspec() and no fnameescape()) list of completion filespecs.
2020-03-03 22:07:14 +01:00
Ingo Karkat 3ec5663361 Refactoring: Extract s:ResolveDirspecsToList() 2020-03-03 22:06:01 +01:00
Ingo Karkat 944c7683ba FIX: Don't concatenate dirspec and filename if the latter is absolute
Instead, make the dirspec empty so that the entire (absolute) addressing is through the user-provided filename.
2020-03-03 21:28:25 +01:00
Ingo Karkat b7a097bb2c WIP: Pass a:isAllowOtherDirs into s:Command() and check whether the passed filename conforms to it
Print an error when trying to reach outside the base directory but that is not allowed by the client (! a:isAllowOtherDirs).
2020-03-03 21:22:53 +01:00
Ingo Karkat 9934de8a2f FIX: Keep ../ prefix when completing upwards directories
Previously, only absolute argleads went into the branch that removes the dirspec from the results, and the (upwards) directories were not resolved (into l:resolvedDirspecs) nor kept.
2020-03-03 21:16:55 +01:00
Ingo Karkat 724f82a4f1 FIX: Need to unescape filename passed to s:ResolveDirspecs()
As that one uses glob() (not an Ex command), and that one takes the unescaped filename. (The dirspec already is unescaped.)
2020-03-03 20:50:48 +01:00
Ingo Karkat 8464fcb3e4 FIX: Don't complete subdirectories of a:dirspecs when argLead already contains a path
But do allow completion of other directories if that is configured.
2020-03-03 20:32:51 +01:00
Ingo Karkat 2127f78d4f FIX: Also complete absolute argLead directories when a:isIncludeSubdirs is false
The a:isIncludeSubdirs should only apply to directories within a:dirspecs; if a:isAllowOtherDirs is true, these directories should be completed regardless of the a:isIncludeSubdirs value.
2020-03-03 17:47:08 +01:00
Ingo Karkat e35875cf4c ingo#plugin#cmdcomplete#dirforaction#setup(): Align generated function names and global context variable name 2020-03-03 15:54:47 +01:00
Ingo Karkat e143a4bf51 Cosmetics: Delete changelog 2020-03-01 19:44:57 +01:00
Ingo Karkat d01606acf7 Renaming: Correct file header and autoload function name after importing into ingo-library 2020-03-01 19:43:38 +01:00