Repository navigation
v1.3.13
The v1.3.13 release adds features that make the i.lua script possible. Argmatchers can now be written to do match completion in directories other than the current directory. Argmatchers can also be written to take a whole command line as an argument: for example the built-in cmd argmatcher (cmd some_command).
Changes in v1.3.13
- Argmatchers can use
:chaincommand()to treat the rest of the command line as another command.- Added an argmatcher for
cmdthat uses:chaincommand(). - E.g. so that completion after
cmd programcan be parsed by an argmatcher forprograminstead ofcmd.
- Added an argmatcher for
- Argmatchers can be more involved in parsing the command line, if they wish. See Responding to Arguments in Argmatchers for more information.
- A callback function can be assigned to an argument position by including
onarg=your_callback_functionin the table given to:addarg(). - The
onargcallback and match functions receive an additionaluser_dataparameter. When parsing begins, theuser_datais an empty table, and your functions can set or get data from the table. Each time a flag or argument links to another argmatcher, the new argmatcher gets a separate new emptyuser_datatable. - The built-in
cdandpushdargmatchers use this to influence match completion for the rest of the input line. E.g.pushd \foo & programTab uses\fooas the current directory when generating possible completions.
- A callback function can be assigned to an argument position by including
- Functions registered with
clink.onfilterinput()may optionally return multiple lines in a table. - Fixed completions for words that contain
., such asclink set color.Tab (regression introduced in v1.3.11). - Fixed doskey macros that use
echo off $T .... - Fixed input line coloring for a drive letter by itself.
- Fixed input line coloring for a file that exists but is not executable.
- Fixed obscure edge case with delayinit argmatchers and
operate-and-get-next. - Fixed potentially inconsistent input line coloring when
classifier:applycolor()is given an escape code that sets only the foreground or background color.