Bash's powerful command line editing in cmd.exe
GPL-3.0 License
Published by chrisant996 almost 3 years ago
autosuggest.async
setting (on by default) that lets suggestions generate matches asynchronously to stay responsive while typing.match.max_rows
setting that limits the number of rows clink-select-complete
can use.match.preview_rows
setting that makes clink-select-complete
show the specified number of rows of matches as a preview, and expands to show the full set of matches when the selection moves past the preview rows (similar to completion in the fish shell).color.comment_row
setting that chooses the color for the comment row in clink-select-complete
. The comment row shows the "and N more matches" or "rows X to Y of Z" messages.clink-select-complete
to wrap on both horizontal and vertical edges (similar to the fish shell).clink-select-complete
at the beginning and end of the list to wrap to the other end based on the menu-complete-wraparound
config variable.clink-diagnostics
command lists prompt filters, generators, classifiers, and suggesters when a numeric argument is given (e.g. Alt+1 then Ctrl+X,Ctrl+Z).os.globdirs()
and os.globfiles()
functions now automatically yield periodically if used inside a coroutine.io.popen()
function now automatically yields periodically if used in read mode (the default) inside a coroutine.io.popenyield()
function now automatically falls back to io.popen()
if used outside a coroutine.clink-select-complete
(regression introduced in v1.2.49).clink-select-complete
when the current match changes the number of visible lines in the edit buffer.Published by chrisant996 almost 3 years ago
mark-modified-lines
support (was removed in v1.2.36).rl.ismodifiedline()
function so prompt filters can show a modified line indicator if they wish.autosuggest.original_case
setting (on by default) that controls whether parts of the line are updated to use the suggestion's original capitalization, or to keep the typed capitalization.terminal.east_asian_ambiguous
setting that controls how the width is determined for the East Asian Ambiguous range of characters (which includes the lambda character). This may help with working around display issues in some terminal hosts.completion
suggestions by suppressing them when the word at the cursor is empty.:suggest()
function on suggesters can now return a suggestion string and an offset where the suggestion begins in the input line.completion-prefix-display-length
and colored-completion-prefix
can coexist.io.popenyield()
get deleted. They were lingering until Lua garbage collection, but they can be deleted almost immediately.emacs-mode-string
and print its own keymap indicator as part of the prompt).vi-undo
command; it was pre-bound to some keys but could not be bound to any other keys.Published by chrisant996 almost 3 years ago
rl.insertmode()
function to get or set whether insert mode is active.clink.onaftercommand()
so scripts can registers a function to be called after every input command (key binding).clink inject
.Published by chrisant996 almost 3 years ago
cua-previous-screen-line
and cua-next-screen-line
, bound to Shift+Up and Shift+Down, to extend the text selection up/down by one screen line.clink set autosuggest.strategy
to list the available suggestion generators.clink-show-help
and clink-popup-show-help
commands can include commands that aren't bound to any key, when the numeric argument is 4 (e.g. Alt+4 then Alt+H).rl.getkeybindings()
function takes an optional mode
argument to control sorting and whether to include commands that aren't bound to any key.clink-paste
command so it sets the mark to the cursor point prior to pasting.history.dupe_mode
is "erase_prev" and history.shared
starts true but changes to false; subsequent commands were not added to the history properly anymore in that session (regression introduced in v1.1.0).clink-select-complete
drawing bug with RPROMPT.Published by chrisant996 almost 3 years ago
sgr
syntax.clink set autosuggest.enable true
. See the autosuggest.enable
and autosuggest.strategy
Clink settings for details.clink.suggester()
function to create new suggestion generators that can be used in the autosuggest.strategy
setting.clink-diagnostics
command also lists match generators registered by clink.generator()
.horizontal-scroll-mode
config variable is on
.clink autorun
commands when paths contain Chinese characters and the system code page isn't UTF8.clink-popup-show-help
command fails.Published by chrisant996 almost 3 years ago
clink set autosuggest.enable true
. See the autosuggest.enable
and autosuggest.strategy
Clink settings for details.clink.suggester()
function to create new suggestion generators that can be used in the autosuggest.strategy
setting.clink-diagnostics
command also lists match generators registered by clink.generator()
.horizontal-scroll-mode
config variable is on
.clink autorun
commands when paths contain Chinese characters and the system code page isn't UTF8.clink-popup-show-help
command fails.Published by chrisant996 almost 3 years ago
magic-space
command that performs history expansion on the text before the cursor point and then inserts a space. Note: this is slightly different than one in bash, which performs history expansion on the whole line and can end up inserting the space in a wrong spot.rl.getbinding()
and rl.setbinding()
functions to query or override key bindings.clink.refilterprompt()
function to invoke prompt filtering on demand.clink-popup-directories
command is now bound by default to Ctrl+Alt+PgUp.clink-select-complete
command is now bound by default to Ctrl+Space.clink-popup-history
command so incremental search works again (regression introduced in v1.2.36).prompt.transient
setting is enabled.Published by chrisant996 almost 3 years ago
clink.ondisplaymatches()
so it receives the right match strings (regression introduced in v1.2.39).bin
subdirectory, instead of the usual versioned subdirectory.Published by chrisant996 almost 3 years ago
Published by chrisant996 almost 3 years ago
clink inject
when the user account name contains non-ASCII characters (regression introduced in v1.0.0).history.max_lines
Clink setting once again supports 0 to mean unlimited. Note that as the history file grows larger, it takes longer to load. If the size becomes a problem, you can use clink history compact <n>
to prune the history file to N items as well as compacting it (removing deleted items).~
by itself does nothing: Completing ~
by itself now inserts the %USERPROFILE% directory. This is different than bash, because on Windows it doesn't make sense for ~ by itself to complete other user accounts. This is a convenient way to expand tilde into a path that Windows understands.cd /d -
isn't supported: The cd -
feature now supports cd /d -
as well. It also supports cd -
even if there is a doskey macro defined for cd
.Published by chrisant996 almost 3 years ago
doskey.enhanced
is true
by default again, but if a macro contains $*
or $1
...$9
tags within quotes then |
and &
symbols are part of the arguments, not command separators (and expansion stops after that macro).doskey.enhanced
is false
; alias|whatever
should not expand alias
because there is no space after it.>&
redirection symbol is present; command >& alias
should not attempt to expand alias
because it's a redirection file name, not a command.Published by chrisant996 almost 3 years ago
display
or description
string is provided by a match generator.doskey.enhanced
setting interferes with some macros (regression introduced in v1.0.0). The setting is now false
by default, because of the incompatibilities it can cause.Published by chrisant996 almost 3 years ago
clink-select-complete
command when descriptions are at the bottom or when an empty display
or description
string is provided by a match generator.Published by chrisant996 almost 3 years ago
Highlights:
display
and description
fields directly -- there's no need to mess around with match display filtering anymore.Full list of changes:
-v
, or "Do nothing" for -n
, etc).--line
, which gets displayed as "--line linenum" when listing possible completions, but only "--line" is inserted.display
and description
strings when adding matches (match_builder:addmatch()
and match_builder:addmatches()
) -- it is no longer necessary to use clink.ondisplaymatches()
.clink-select-complete
command now shows match descriptions in a single line at the bottom (instead of in a second column) when there are more than 9 matches.color.arginfo
Clink setting for the arguments for a flag or argument when listing possible completions.color.description
Clink setting for the default match description color when listing possible completions.&
, |
) and redirection symbols (<
, >
, >&
) are colored in the input line, using colors from the new color.cmdsep
and color.cmdredir
Clink settings.clink-select-complete
; it had sometimes missed expanding the set of matches accordingly.clink-popup-history
command to respect the search-ignore-case
setting.:nofiles()
to dead-end an argmatcher (regression introduced in v1.0.0).clink.ondisplaymatches()
and clink.onfiltermatches()
when there's only 1 match./flag:
or /flag=
flags.match.wild
works with deprecated match generators; e.g. arg completions for z.lua weren't working (regression introduced in v1.1.5).clink --profile
so it produces directory matches.%CLINK_RPROMPT%
alignment when color.prompt
is set.Published by chrisant996 about 3 years ago
Published by chrisant996 about 3 years ago
win-history-list
command bound to F7 by default. This shows the history list, and executes the selected history entry.color.popup
Clink setting for the popup colors. If not set, the console's popup colors are used.color.popup_desc
Clink setting for the popup colors for the description column(s). If not set, a color is chosen to complement the console's popup colors.clink.gui_popups
Clink setting that can be set to use GUI popup windows as before (the color.popup
settings have no effect on GUI popup windows).clink-select-complete
command when print-completions-horizontally
is on (and also minor issues when it is off).clink-select-complete
command when a Lua script has used rl.setmatches()
to provide a custom list of matches.clink-menu-complete-numbers
family of commands (regression introduced in v1.2.32).Published by chrisant996 about 3 years ago
rl_buffer:getanchor()
to get the text selection anchor (there is no set function; use rl.invokecommand()
to invoke commands to set/extend the selection if needed).rl.invokecommand()
.mark-directories
is off
in the .inputrc file.Published by chrisant996 about 3 years ago
line_state
as a second argument.clink.default_bindings
is windows
.exec.files
setting so completion works when a path is specified (e.g. subdir\foo
) (regression introduced in v1.2.33).\015
(regression introduced in v1.0.0).Published by chrisant996 about 3 years ago
clink.default_bindings
Clink setting to choose between bash
or windows
default key bindings. bash
key bindings are still the default, for compatibility with existing Clink installations.exec.aliases
, exec.commands
, and exec.files
Clink settings to further customize how matches are generated for the first word when the exec.enable
Clink setting is enabled.WriteConsoleW()
system API.clink-selectall-conhost
command that mimics the default Windows console Select All command.clink-select-complete
to remove duplicate matches if generators try to add duplicate matches.%PATH%
is not set and exec.enable
and exec.path
are both enabled.quoted-insert
command.