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
cmd
that uses:chaincommand()
. - E.g. so that completion after
cmd program
can be parsed by an argmatcher forprogram
instead 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_function
in the table given to:addarg()
. - The
onarg
callback and match functions receive an additionaluser_data
parameter. When parsing begins, theuser_data
is 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_data
table. - The built-in
cd
andpushd
argmatchers use this to influence match completion for the rest of the input line. E.g.pushd \foo & program
Tab uses\foo
as 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.