-
Notifications
You must be signed in to change notification settings - Fork 194
Expand file tree
/
Copy pathCHANGES
More file actions
834 lines (666 loc) · 78.8 KB
/
CHANGES
File metadata and controls
834 lines (666 loc) · 78.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
# Changes
### Releases from [chrisant996/clink](https://github.com/chrisant996/clink) fork
#### v1.9.18
- Fixed a race condition where `menu-complete` could get stuck thinking there were 0 matches if completion was invoked while an argmatcher's `delayinit` function was running in the background.
- Fixed the `suggestionlist.hide_hints` setting (when false) to allow History Expansion input hints.
- Fixed glitches in displaying Readline messages in the prompt during `execute-named-command` and `non-incremental-reverse-search-history` (regression introduced in v1.9.16).
- Fixed some obscure problems with using Readline macro text in Clink that have existed since 2016.
- Fixed a cosmetic issue where the clickable link for History Expansion input line coloring could get split into many separate hover-underline segments.
- Fixed a Lua stack leak (since v1.1.13).
- Internal logging improvements.
#### v1.9.17
- Fixed detection of `rem` commands; this affects input line coloring, argmatchers, input hints, and match generators.
- Fixed [#843](https://github.com/chrisant996/clink/issues/843); `clink update` writes malformed `DisplayVersion` which confuses `winget` (regression introduced in v1.9.12).
#### v1.9.16
- Added new Lua API [os.getexesubsystem()](#os.getexesubsystem) which returns whether an executable file uses the console or GUI subsystem.
- Fixed a garbled prompt if `clink.refilterprompt()` changes the prompt while a Readline mode with a message is active (e.g. `reverse-search-history`).
- Fixed <kbd>Ctrl</kbd>-<kbd>C</kbd> disabling the suggestion list.
#### v1.9.15
- Fixed the suggestion list to only respond to <kbd>Ctrl</kbd>-<kbd>G</kbd> if it's currently bound to `abort` (the default binding). This is important to allow custom key bindings for <kbd>Ctrl</kbd>-<kbd>G</kbd> to coexist peacefully with the suggestion list.
- Fixed incorrect input line coloring in some cases (regression introduced in v1.9.12).
#### v1.9.14
- Changed the suggestion list to ignore trailing whitespace when filtering for duplicate entries.
- Fixed a case where if an input hint exists for a flag ending in `=` then the input hint didn't get shown until more text was typed (such as after `foo --flag=`).
#### v1.9.13
- Fixed [#838](https://github.com/chrisant996/clink/issues/838); failure to download .cat file when trying to update from v1.9.12 -- a manual update is necessary.
#### v1.9.12
- Added new `suggestionlist.hide_hints` setting to control whether to hide input hints while using the suggestion list (input hints are normally controlled by the `comment_row.show_hints` setting, and are hidden by default while using the suggestion list).
- Added a type-ahead optimization in popup lists to avoid redundant or unnecessary processing during incremental find or filter input.
- Improve command line parsing to recognize when an executable exists with the same name as a built-in CMD command (e.g. "echo.exe") and predict whether CMD will run the built-in CMD command or the executable file. This affects argmatchers, completion, and input line coloring.
- Changed Clink's built-in updater to verify digital signatures before applying an update.
- Fixed position of highlights in the suggestion list to consistently use the earliest matching position.
- Fixed [#835](https://github.com/chrisant996/clink/issues/835); Unicode input is garbled in popup lists (regression introduced in v1.8.0).
- Fixed edge cases where certain Unicode input could be misinterpreted in popup lists and in `clink-select-complete`.
- Fixed potential for a buffer overread if invalid UTF8 bytes are encountered.
- Internal logging improvements.
#### v1.9.11
- Added new Lua API [console.getoriginaltitle()](#console.getoriginaltitle) which gets what the OS considers to be the original console title.
- Fixed a potential crash if the terminal title is an empty string; an OS API is not behaving as documented (regression introduced in v1.9.10).
#### v1.9.10
- Changed the default binding for <kbd>F7</kbd> to `clink-popup-history` instead of `win-history-list`.
- Fixed potential for incorrect input line coloring after using `clink-popup-history` to choose a history line.
- Fixed `win-history-list` with typed input (regression introduced in v1.6.13).
- Fixed rare issues with the `cmd.admin_title_prefix` setting.
- Internal logging improvements.
#### v1.9.9
- Fixed [#829](https://github.com/chrisant996/clink/issues/829); attempt to compare nil with number (regression introduced in v1.9.8).
#### v1.9.8
- Changed [os.sleep()](#os.sleep) so it yields when called in a coroutine.
- Fixed the "Display all...?" prompt in `clink-select-complete` to show up at the right times.
- Fixed several obscure problems with queued input, e.g. from doskey aliases that include `$T` and from pasting multiline text via the `clink-paste` bindable command.
- Fixed title bar flicker in Windows Terminal caused by the `cmd.get_errorlevel` setting.
- Internal improvements for unit tests.
#### v1.9.7
- Fixed [#825](https://github.com/chrisant996/clink/issues/825); multiline pasting via the Clink paste command with `clink.paste_crlf` set to `crlf` could report an unexpected and confusing message (regression introduced in v1.9.6).
#### v1.9.6
- Fixed multiline pasting via Clink's paste command when the `clink.paste_crlf` setting is `crlf` and the pasted input causes the "More?" prompt to appear.
- Fixed [#824](https://github.com/chrisant996/clink/issues/824); multiline pasting via the conhost or Windows Terminal paste command could miss a character, and end up processing the character out of order (regression introduced in v1.8.7).
#### v1.9.5
- Fixed [git.getbranch()](#git.getbranch) failure cases in a git repo using reftable storage.
#### v1.9.4
- Changed [git.getbranch()](#git.getbranch) to accept an additional argument to compensate for a breaking change in git for reftable storage.
- Changed the built-in custom prompts to compensate for the reftable storage breaking change in git.
- Improve palette entry matching in the built-in terminal emulator.
- Fixed some inefficiencies in the Headline clinkprompt.
#### v1.9.3
- Added new [`CLINK_ANSI_HOST`](#override-terminal-detection) environment variable to control Clink's terminal support in a session without needing to change the `terminal.emulation` setting in the profile.
- Added new `terminal.shell_integration` setting to control sending [shell integration codes](https://learn.microsoft.com/en-us/windows/terminal/tutorials/shell-integration) to the terminal.
- Optimized detection of Windows Terminal and resolved all known misdetection cases (tested more than 20 different specific cases).
- Fixed incorrect width measurement of U+3030, U+303D, U+3297, and U+3299.
- Fixed edge cases in parsing invalid UTF16.
- Fixed [#821](https://github.com/chrisant996/clink/issues/821); workaround for an issue occurring in WezTerm (Nightly builds of WezTerm worked, but the current WezTerm release is from February 2024 and contains an old version of ConPTY that lacks a specific fix).
#### v1.9.2
- Added workaround for JetBrains terminal bug ([#819](https://github.com/chrisant996/clink/issues/819)).
#### v1.9.1
- Fixed [#817](https://github.com/chrisant996/clink/issues/817); error reporting was not graceful if the updater encountered a failure trying to access the github URLs (e.g. if a firewall blocks outgoing network calls).
#### v1.9.0
- Added new Lua API [http.request()](#http.request) which invokes an http request (and yields when used in a coroutine) and returns the result.
- Change the updater to no longer use Powershell; now it uses native OS APIs for http requests and zip file extraction.
- Fixed detection of Windows Terminal when the OS automatically launched WT (regression introduced in v1.8.5).
- Fixed match display filtering sometimes running match generators twice.
- Fixed the `out` command in the Lua debugger.
- Fixed the suggestion list to not intercept keys while a multikey input chord is in progress (e.g. if <kbd>Ctrl</kbd>-<kbd>x</kbd>,<kbd>Esc</kbd> is bound, then the suggestion list intercepted the <kbd>Esc</kbd> key by mistake, causing the input to be misinterpreted).
- Fixed pagination for UTF8 macro text entries in `clink-show-help` (<kbd>Alt</kbd>-<kbd>h</kbd> by default).
- Fixed a theoretical edge case where the suggestion list might activate slightly late if there's exactly only 1 key of queued input at the beginning of a new input prompt.
- Fixed [#813](https://github.com/chrisant996/clink/issues/813); potential for crashes when a popup list is filtered to be empty.
#### v1.8.8
- Changed the installer to always install the icon files.
- Fixed the `clink.bat` script and the updater when the user account name contains `&` `|` `<` or `>` characters.
- Fixed display and insertion of completions generated by argmatchers that used `fromhistory=true`.
- Fixed the uninstaller to delete some files it accidentally left behind.
- Fixed a diagnostic message lacking detail in an obscure case of coroutine cancellation.
#### v1.8.7
- Changed to only generate suggestions if there is no more input available. For example, otherwise pasting input could repeatedly generate suggestions over and over and refresh the display, even though the suggestions will be discarded by the next input key.
- Changed the `clink-diagnostics` command to show total time spent by each coroutine.
#### v1.8.6
- Changed how repeated deletions work in popup lists (such as the history popup list): pressing <kbd>Del</kbd> repeatedly now deletes downwards by default (previously it deleted upwards).
- Added new `clink.popup_delete_direction` setting to control the direction of deletions when pressing <kbd>Del</kbd> repeatedly in popup lists (such as the history popup list).
- Added new Lua API [clink.argmatcherloader()](#clink.argmatcherloader) which registers a callback function that can intercept and extend on-demand loading for argmatchers.
- Running `clink config prompt show` now shows the name of the currently selected *.clinkprompt custom prompt (if any).
- Fixed macro text playback in macros containing a newline (regression introduced by an incorrect change in v1.2.34 which was exacerbated by a change in v1.7.17).
#### v1.8.5
- Added new Lua API [os.getdiskfreespace()](#os.getdiskfreespace) which returns the free and total space.
- Improved detection of Windows Terminal during `clink config prompt`.
- Fixed `clink config prompt` and `clink set` to load the user's `.inputrc` file (some settings it in can affect prompt previews, for example).
#### v1.8.4
- Added a new `starship.clinkprompt` script. Run `clink config prompt use starship` to use it.
- Added `--all` flag to show all themes or prompts: `clink config theme show --all` or `clink config prompt show --all`.
- Added input hint text for `:chaincommand()` and for the `onadvance` and `onalias` callbacks. If no input hint is specified then the default input hint text is "Argument expected: command [args]".
- Improved error reporting in the `oh-my-posh.clinkprompt` script.
- Fixed input line coloring for <code>clink set <span class="arg">some_string_setting</span> clear</code>.
- Fixed [#799](https://github.com/chrisant996/clink/issues/799); in legacy console, using the `clink-selectall-conhost` bindable command scrolls back to the last line after dismissing the Find dialog.
- Fixed a bug in the unit test harness which under rare circumstances could randomly make unit tests fail (regression introduced in v1.1.1-alpha by the Readline 8.0 update).
#### v1.8.3
- Added an optional `hide=` field in `_argmatcher:addarg()` and `_argmatcher:addflags()`. Any strings listed in the `hide` field are added to the argument slot or list of flags, but completion functions will not show them. This gives argument slots the same ability that flags had with `_argmatcher:hideflags()`.
- Added the `OSC9;9` escape sequence to the prompt in Windows Terminal and ConEmu, to let the terminal know the current directory. For example, this enables Windows Terminal's "Duplicate Tab" command to apply the current directory to the new tab.
- Fixed the suggestion list to hide and go temporarily inactive after commands like `complete` which print some output and then show another prompt line. The suggestion list becomes active again after something changes the input line (or changes the cursor position away from the end of the input line and then back to the end of the input line).
- Fixed `clink --profile DIR inject` (regression introduced in v1.3.47).
#### v1.8.2
- Improved highlight position and length detection in the suggestion list for some completions.
- Added new `suggestionlist.num_history` setting to control how many history suggestions can be shown before suggestions from other sources (from 1 to 8).
- Added an optimization when re-drawing the suggestion list.
- Added to vi mode the <kbd>F2</kbd> key binding for the `clink-toggle-suggestion-list` command.
- Fixed the right alignment of the autosuggest hint string in vi mode (regression introduced in v1.3.43).
- Fixed [#797](https://github.com/chrisant996/clink/issues/797); crash when typing in vi mode (regression introduced in v1.8.0).
#### v1.8.1
- Fixed [#796](https://github.com/chrisant996/clink/issues/796); unable to load Clink on Win7 and earlier (regression introduced in v1.8.0 by Readline changes).
#### v1.8.0
- Added an interactive list mode for choosing from available suggestions. This is similar to PowerShell's "listview" mode.
- Added a `clink-toggle-suggestion-list` command (<kbd>F2</kbd> by default) which toggles the suggestion list mode on/off.
- Added a `suggestionlist.default` setting which can make a Clink session start with the suggestion list mode on.
- Added new `color.suggestionlist*` color settings for the suggestion list colors.
- Added new Lua API [clink.opensessionstream()](#clink.opensessionstream) which opens or creates a named in-memory stream that behaves like a Lua file handle and lasts for the duration of the Clink session, even when the Lua VM is restarted (such as by <kbd>Ctrl</kbd>-<kbd>x</kbd> <kbd>Ctrl</kbd>-<kbd>r</kbd>).
- Added `debug.log_prompt` setting which logs the raw prompt string generated by prompt filters.
- Changed the `clink-diagnostics` command to analyze the whole prompt for ambiguous width Chinese, Japanese, and Korean characters (not just the last line of the prompt).
- Fixed <kbd>Esc</kbd> to not ding every time (it was never meant to ding).
- Fixed <kbd>Ctrl</kbd>-<kbd>Break</kbd> during the `clink-select-complete` command to only display one new prompt.
- Fixed temporarily-missing timestamp in history popup after using the `add-history` command.
- Fixed `clink /?`.
- Fixed the `operate-and-get-next` command when the `history.sticky_search` setting is enabled (it fetched the same history entry each time).
- Fixed a potential crash after <kbd>Enter</kbd>, due to Readline ending a prompt with inconsistent state left over.
- Fixed two memory management issues in Readline undo handling, which in certain edge cases could potentially cause heap corruption.
- Fixed popup lists accidentally treating control characters as part of an incremental search (especially problematic when the `terminal.raw_esc` setting is enabled).
- Fixed [#786](https://github.com/chrisant996/clink/issues/786); `clink autorun` claims the "AutoRun" reg key has a "current user" WOW64 key, but there's no such thing.
- Fixed [#791](https://github.com/chrisant996/clink/issues/791); in legacy console, clicking on the terminal after using mouse to move scrollbar accidentally scrolls to the last line.
- Minor improvement to error handling for certain failures in oh-my-posh.
- Picked up fixes and changes from the Readline repo:
- **Breaking Change:** The name for `readline-colored-completion-prefix` no longer has a leading `.`.
- Sync with how the Readline repo picked up some fixes and changes contributed from the Clink repo.
- Changes for Unicode combining characters.
- Fixed some undo list memory management bugs; leaks and double-frees (i.e. heap corruption).
- Fixed some use-after-free of the undo list errors when stacking multiple commands that use `rl_maybe_replace_line()` to save changes to a history entry.
- Fixed the non-incremental history search implementation to make it more consistent with incremental search.
- Fixed `completion-prefix-display-length` and `colored-completion-prefix` to be mutually exclusive.
- Fixed a bug that allowed <kbd>^G</kbd> to retain a saved command to execute.
- Fixed macro recording during searches.
- Fixed off-by-one error when tokenizing words like `$((expr))` while performing history expansion.
- Fixed to not check for signals when handling a received signal.
- Fixed signal checking to handle signals that arrive before Readline restore's the application's signal handlers.
- Fixed attempting to change case of invalid multibyte characters.
- Fixed some small leaks in edge cases.
#### v1.7.22
- Explicitly disable `loadlib` and related support in Lua; Clink uses a statically linked Lua engine and does not support dynamic C libraries.
- Fixed the `onprovideline` event so it doesn't interfere with the `same_dir` mode of `prompt.transient`.
- Fixed input line coloring of `echo` in `for %i (1 2 3) do @echo %i` (regression introduced in v1.6.16).
- Fixed how `clink autorun set` parses flags and quotes, so that `clink autorun set \"c:\my tools\clink\" inject --autorun` works as expected.
- Fixed the `exec.commands` setting when an argmatcher uses `:chaincommand()`.
- Fixed edge cases for `@` command prefix when an argmatcher uses `:chaincommand()`.
- Fixed [#779](https://github.com/chrisant996/clink/issues/779); an argmatcher's `onadvance` callback accidentally advanced two times if it advanced to the last argument slot.
- Fixed [#782](https://github.com/chrisant996/clink/issues/782); on Windows 8.1, some multiline prompts may render with extra blank lines.
#### v1.7.21
- Fixed <kbd>Tab</kbd> expansion of `foo ~` when there is no argmatcher for `foo`.
- Fixed [#772](https://github.com/chrisant996/clink/issues/772); uninstall fails to uninstall autorun if the logged on user is not an administrator.
- Fixed [#773](https://github.com/chrisant996/clink/issues/773); unexpected completion behavior after a doskey alias command.
#### v1.7.20
- Fixed [#763](https://github.com/chrisant996/clink/issues/763); transient prompt has blank line after it if the input line is the width of the terminal (regression introduced in v1.7.0).
- Fixed [#765](https://github.com/chrisant996/clink/issues/765); inside a batch script, `setlocal` interferes with injecting Clink (regression introduced in v1.1.1).
#### v1.7.19
- Fixed some unnecessary work that was performed when starting the Lua engine (a tiny performance boost).
- Fixed `os.getcwd()` when the [LongPathsEnabled](https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#registry-setting-to-enable-long-paths) regkey is set.
- Fixed the application manifest for the `clink_*.exe` programs to mark them as longPathAware (this doesn't affect CMD; while Clink is injected in CMD, then CMD's manifest is what controls long path awareness).
- Fixed the `oncommand` event when using `clink-popup-history` to select and execute a command from history.
- Fixed [#756](https://github.com/chrisant996/clink/issues/756); Clink could potentially think it wasn't elevated when running as `LOCAL_SYSTEM` or the builtin `Administrator` account.
- Fixed [#758](https://github.com/chrisant996/clink/issues/758); avoid crashing in a pathological case where something else abuses CMD by injecting background threads that actively garble input and output.
- Fixed the `info` command in the Lua debugger.
#### v1.7.18
- Fixed [#752](https://github.com/chrisant996/clink/issues/752); `clink config theme use {name}` reports an error (regression introduced in v1.7.17).
#### v1.7.17
- Added "4-bit Enhanced Defaults.clinktheme" color theme which approximates the "Enhanced Defaults" colors using only 4-bit terminal colors.
- Added a `clink config theme save -d` flag to save a color theme with placeholders for color settings whose current value matches its default value. Loading a color theme saved this way resets those colors to whatever default values are defined at the moment the file is loaded.
- Changed the default behavior for throttling Lua coroutines. By default there is no throttling anymore. The new `lua.throttle_interval` setting can be used to enable throttling of Lua coroutines if they cause responsiveness issues. Prior to this, the throttling interval had been hard-coded to 5 seconds, but now it's configurable and is 0 by default (no throttling).
- Changed `rl.getpromptinfo()` to be allowed during transient prompt filtering (but still not during normal prompt filtering).
- Added an optimization to replay keyboard macros faster.
- Added an optimization to read key sequences faster, which makes Clink a little more responsive while typing.
- Fixed erasing leftover input text if the prompt height changes while typing.
- Fixed the `oncommand` event when an argmatcher uses `:chaincommand()`.
- Fixed the `line_state` sent to `luafunc:` macros invoked during a keyboard macro (it was empty if the keyboard macro had changed the input line).
- Fixed use of `clink.promptcoroutine()` during transient prompt filtering (it was accidentally trying to do asynchronous prompt filtering, which isn't possible during transient prompt filtering).
- Fixed the `onadvance` callback in argmatchers so it doesn't interfere with match generation.
- Fixed a problem where `clink-popup-history` could leak or lose the undo list from the current input line.
- Fixed an error when applying a `*.clinktheme` file with a `[clear]` section.
- Fixed [#751](https://github.com/chrisant996/clink/issues/751); multi-line oh-my-posh config without newlines causes display problem.
#### v1.7.16
- Fixed potential crash after pressing <kbd>Home</kbd> and then deleting the first word in the input line (regression introduced in v1.7.15).
#### v1.7.15
- Fixed the sequence of characters `clink echo` reports for <kbd>Ctrl</kbd>-<kbd>Bkspc</kbd>.
- Fixed an issue where the `match.expand_abbrev` setting could accidentally move the cursor position when trying to complete `x:\does_not_exist`.
- Fixed input line coloring to refresh the display if `clink.argmatcher()` registers a new argmatcher in response to an event such as `clink.oncommand`.
- Fixed extra prompt(s) that could printed if a `luafunc:` command used `rl_buffer:beginoutput()` and then `rl.invokecommand()` to invoke another `luafunc:` command that did the same, nesting multiple times.
- Fixed negative numeric arguments with `rl_buffer:getargument()` and `rl_buffer:setargument()`.
- Fixed potential heap corruption in `os.enumshares()`.
- Fixed both completions and `clink.parseline()` when a command is a doskey alias but ends up with only a command name and spaces after expanding the alias (completions got confused about which argument slot was being completed, and `clink.parseline()` accidentally reported an extra empty word at the end of the input line).
- Fixed refreshing the display after an `oncommand` callback loads a new argmatcher.
- Fixed [#743](https://github.com/chrisant996/clink/issues/743); output doesn't scroll terminal correctly when the terminal screen buffer width is wider than the terminal window width (regression introduced in v1.6.2).
- Fixed [#744](https://github.com/chrisant996/clink/issues/744); `git.getaction()` prevents git from properly cleaning up rebase files if you edit a commit during a rebase.
- Fixed [#745](https://github.com/chrisant996/clink/issues/745); out of bounds read in memcpy after typing `cmd /;=` and then moving the cursor left twice (regression introduced in v1.5.17).
#### v1.7.14
- Added a new `clink.scroll_offset` setting which controls how many lines to show above or below the selected item in popup lists or the `clink-select-complete` command (default is 3).
- Changed <code>clink set <span class="arg">name</span></code> to include the default value of the named setting.
- The Antares clinkprompt now allows configuring the characters for showing the previous command's exit code (refer to the Antares.clinkprompt file for details).
- The `clink-diagnostics` and `clink-diagnostics-output` bindable commands also show the current *.clinkprompt custom prompt file, if any.
- Fixed a problem where <kbd>Esc</kbd> could leak or corrupt history undo lists when used after searching history (the problem existed since v0.1 in 2012).
- Fixed the `clink-show-help` command to stop listing the `A-f` default key binding as an "Uncategorized" command.
- Fixed a typo in the Antares clinkprompt when trying to detect a bare git repo.
- Fixed the `history.sticky_search` setting (regression introduced in v1.5.12).
- Fixed default color for `color.selected_completion` to have better contrast ratio in light terminal themes.
- Fixed input edge cases in the `win-history-list` command which missed updating the display.
- Fixed a color glitch in the `clink-popup-history` command for history lines marked as having been modified in memory.
- Fixed the `win-history-list` command to show a mark for history lines that have been modified in memory, like the `clink-popup-history` command already does.
- Fixed an issue where instead of always starting on a new line, output from a command could potentially accidentally start at the end of the input line.
- Fixed some memory management bugs in history item undo lists.
- Added a workaround to fix [#738](https://github.com/chrisant996/clink/issues/738); Windows Terminal does not handle the `CSI K` code correctly when the cursor is past the end of the screen line.
- Improvements for [#739](https://github.com/chrisant996/clink/issues/739); ConsoleZ, ConEmu, and other tools can interfere with injecting Clink (there's no way to completely prevent opportunities for interference, but this reduces the chances).
#### v1.7.13
- Added an error message when `clink set` fails to write the `clink_settings` file (e.g. no permission or the file is marked read-only).
- Added logging when `clink inject` is slow.
- Added keyboard info in `clink echo --verbose`.
- Condensed the logging during `clink inject`, but if an error occurs while hooking system APIs then it automatically emits verbose logging instead of condensed logging.
- Fixed the maximum vertical scroll position limiter to include the input hint row when using the legacy Windows conhost.
- Fixed [#732](https://github.com/chrisant996/clink/issues/732); Executable Completion does not recognize `.LNK` files.
#### v1.7.12
- Fixed what `io.popenyield()` returns upon failure; previously it accidentally only returned nil, and now upon failure it returns the usual values (nil, error message, error code).
- Fixed [#727](https://github.com/chrisant996/clink/issues/727); custom prompts can crash Clink when `cd` into a path that exceeds MAX_PATH length.
#### v1.7.11
- Changed the `clink-diagnostics-output` bindable command to include a list of the current Clink settings.
- Changed logged error codes to include the corresponding message text for the error code.
- Fixed input hints in chained argmatchers (it could sometimes show a hint from the preceding word by mistake).
- Fixed height of scrollbars in popup lists and in the `select-complete` command (they were half as tall as they should have been).
#### v1.7.10
- Added new Lua API [unicode.char()](#unicode.char), similar to [string.char()](https://www.lua.org/manual/5.2/manual.html#pdf-string.char) but for Unicode codepoints instead of ASCII values.
- Added a `clink-diagnostics-output` bindable command, bound by default to the sequence <kbd>Ctrl</kbd>-<kbd>x</kbd> <kbd>Ctrl</kbd>-<kbd>Shift</kbd>-<kbd>z</kbd>. The command writes internal diagnostic information to a file which can be shared to simplify troubleshooting. This command also includes a list of all loaded Lua scripts.
- Fixed [#721](https://github.com/chrisant996/clink/issues/721); potential crash if console window width is less than console screen buffer width (regression introduced in v1.7.5).
#### v1.7.9
- Fixed [#719](https://github.com/chrisant996/clink/issues/719); async prompt filtering can stall for 15 seconds (regression introduced in v1.7.8).
#### v1.7.8
- Added <kbd>Ctrl</kbd>-<kbd>C</kbd> binding in vi keymaps, to match normal Readline behavior ([#716](https://github.com/chrisant996/clink/discussions/716)).
- Fixed missing auto-suggestions when anchored to the end of the input line (regression introduced in v1.6.4).
- Fixed [#718](https://github.com/chrisant996/clink/issues/718); potential for "coroutine is orphaned" error, depending on the CPU speed and how `autosuggest.strategy` is configured (regression introduced in v1.3.26).
#### v1.7.7
- Fixed [#713](https://github.com/chrisant996/clink/issues/713); character width measurements are wrong for some Chinese characters in terminals other than Windows Terminal (regression introduced in v1.7.6).
#### v1.7.6
- Update Win8.1 character width measurements from [wcwidth-verifier](https://github.com/chrisant996/wcwidth-verifier).
- Fixed a case where other popup list colors could interfere with the `colors.border` color in `clink.popuplist()`.
- Fixed [#709](https://github.com/chrisant996/clink/issues/709); TAB expansion doesn't work for `cd ~` (regression introduced in v1.3.36).
#### v1.7.5
- Added new Lua API [console.ellipsify()](#console.ellipsify) to truncate an input string in various ways.
- Added new [rl_buffer:setcommentrow()](#rl_buffer:setcommentrow) to let [`"luafunc:"` commands](#luakeybindings) immediately show text in the comment row.
- Adjusted some character width measurements based on analysis from [wcwidth-verifier](https://github.com/chrisant996/wcwidth-verifier) on Win8.1, Win10 with conhost, Win10 with Windows Terminal 1.22, Win11 with conhost, and Win11 with Windows Terminal 1.22.
- The Headline, Pure, and Bureau clinkprompt files now consider unpublished branches as being "ahead", even in cases where git doesn't report a specific "ahead by" count.
- Internal changes to the right side prompt implementation, to disentangle unnecessary internal dependencies.
#### v1.7.4
- Changed searching for color themes and custom prompts to always include `themes\` directories under the Clink program directory and Clink profile directory, even when the `clink.path` setting has been used to remove them from the list of script directories.
- Improved emoji width measurements.
- Unqualified emojis are counted as a single cell now. Windows Terminal intentionally renders these as a single cell for compatibility with the behavior of the first terminal programs on Linux that began to support emoji characters (an important compatibility detail for the Windows Subsystem for Linux, for example).
- Country flag emoji character pairs are recognized.
- Skin tone variant selectors are recognized.
- The zero width joiner is recognized when it joins two emoji characters, or an emoji and a male or female symbol.
- **NOTE:** A given OS version and terminal program version will only recognize certain combinations of joined emojis as valid sequences. And Windows Terminal is one of the only terminal programs on Windows that can draw color emoji characters. Clink has no way to know how a given terminal will actually render sequences of Unicode emoji characters. If a terminal program renders a particular emoji sequence differently than Clink predicts, then the display may become garbled. If that happens, don't use that emoji sequence. But if a terminal program renders an emoji sequence as a single glyph and Clink predicts the width incorrectly, then please open an issue with details about the emoji.
- The pure.clinkprompt now also supports virtualenv's `VIRTUAL_ENV_DISABLE_PROMPT` and `VIRTUAL_ENV_PROMPT` environment variables.
- Added [console.cellcountiter()](#console.cellcountiter) so scripts can iterate over Unicode character sequences in a string. Using `unicode.iter()` returns one codepoint at a time, but emojis can have multiple codepoints and `console.cellcountiter()` groups them together for easy processing and accurate overall width measures (measuring the width of each codepoint in an emoji sequence is not the same as measuring the width of the emoji sequence as a whole).
- Fixed the right side transient prompt so it shows up even when identical to the right side normal prompt.
- Fixed the `demo` callback in .clinkprompt files.
- Fixed potential for incomplete input of Unicode surrogate pairs. An easy way to encounter the problem was using the Windows emoji picker to input an emoji that's a sequence of other emojis joined together -- for example, the pride flag emoji is a flag emoji joined with a rainbow emoji, and the rainbow emoji uses a surrogate pair.
- Fixed an edge case where if a .clinkprompt file calls `require()` to load a module, and later on a different script also calls `require()` for the same module, then any event handlers or prompt filters registered by the required module accidentally only worked inside the .clinkprompt that originally required it. Now required modules behave the same regardless whether they are first required by a .clinkprompt file or by some other script file.
- Fixed [#685](https://github.com/chrisant996/clink/issues/685); CTRL-L while input text is present redraws the input line wrong.
- Fixed [#686](https://github.com/chrisant996/clink/issues/686); `clink config -h` shows inaccurate info.
- Fixed [#696](https://github.com/chrisant996/clink/issues/696); console width length off-by-one on certain characters (in particular U+26A1).
- Fixed [#698](https://github.com/chrisant996/clink/issues/698); script error when using `clink config prompt show pure`.
- Fixed [#701](https://github.com/chrisant996/clink/issues/701); issues in Antares prompt (missing tag and error when truncation is needed).
#### v1.7.3
- Added the missing Tomorrow* color themes.
- Fixed [#682](https://github.com/chrisant996/clink/issues/682); the `clink config theme use` and `clink config prompt use` commands had no effect if there is no `clink_settings` file yet.
#### v1.7.2
- Fixed an error when the updater tried to install the new `themes\` subdirectory and files.
#### v1.7.0
Clink now supports color theme files and custom prompt files. These enable packaging Clink color settings or Clink custom prompts into shareable files. This finally makes it easy to download and apply themes or prompts shared by other people, or copy them and modify them. The new [clink-themes](https://github.com/chrisant996/clink-themes) repo is a site where .clinktheme and .clinkprompt files can be shared (see [Contributing](https://github.com/chrisant996/clink-themes#contributing) for details on how to contribute your own themes and prompts).
- Added support for `*.clinktheme` color theme files; see [Color Themes](#color-themes) for more information.
- Added several `clink config theme` commands for color themes (run `clink config theme --help`).
- The famous [Dracula](https://draculatheme.com), [Solarized](https://github.com/altercation/solarized) (light and dark), and [Tomorrow](https://github.com/chriskempson/tomorrow-theme) (1 light, 4 dark) themes are included.
- Use <code>clink config theme use <span class="arg">name</span></code> to apply a color theme, or set the `CLINK_COLORTHEME` environment variable to the color theme name.
- Added support for `*.clinkprompt` custom prompt files; see [Custom Prompts](#custom-prompts) for more information. This makes it easy to share custom prompts, and to have a library of many different custom prompts and switch between them quickly and easily. One .clinkprompt can be active at a time; activating one deactivates any others.
- Added several `clink config prompt` commands for custom prompts (run `clink config prompt --help`).
- [Oh-My-Posh](#oh-my-posh) support is included.
- Also included are ports of [Agnoster](https://github.com/agnoster/agnoster-zsh-theme), [Pure](https://github.com/sindresorhus/pure), [Headline](https://github.com/Moarram/headline), [Antares](https://github.com/elB4RTO/zsh-themes/tree/master/antares), and a few others (all ported from zsh to Clink).
- Use <code>clink config prompt use <span class="arg">name</span></code> to activate a custom prompt module, or set the `CLINK_CUSTOMPROMPT` environment variable to the custom prompt name.
- Added the ability to show input hints in the comment row (below the input line).
- Input hints are off by default, and can be enabled with `clink set comment_row.show_hints true`.
- Argmatchers can provide input hints; see [Show a Usage Hint](#addarg_hint) for more information.
- Lua scripts can create custom hinters; see [Showing Input Hints](#showinginputhints) for more information.
- Enhanced the syntax for setting colors; added `italic` and `reverse`, and added `#XXXXXX` and `#XXX` shortcuts for specifying 24-bit color values.
- Added more popup list colors: `color.popup_border`, `color.popup_header`, `color.popup_footer`, `color.popup_select`, and `color.popup_selectdesc`.
- Changed phrasing from "Accept Suggestion" to "Insert Suggestion" in the documentation and in the auto-suggestions usage hint text.
- Changed the Lua `print()` function to support UTF8 output and terminal escape codes. Now the only reasons for a script to use `clink.print()` instead of `print()` are (1) background compatibility or (2) using `NONL` to suppress printing a line ending.
- Improved terminal output logging when the `debug.log_terminal` setting is enabled (the setting is only for diagnostic use).
- Now it captures all WriteConsoleW and WriteFile output sent to stdout or stderr (instead of only capturing output from the Readline library).
- Added a `debug.log_output_callstacks` setting which includes callstacks for each output reported by the `debug.log_terminal` setting.
- Added a workaround for Unicode limitations in legacy console windows and legacy terminals (improves cursor position accuracy when Unicode surrogate pairs are present).
- Added several new Lua APIs for color themes and custom prompts: [clink.getprompts()](#clink.getprompts), [clink.applyprompt()](#clink.applyprompt), [clink.getclinkprompt()](#clink.getclinkprompt), [clink.getthemes()](#clink.getthemes), [clink.readtheme()](#clink.readtheme), [clink.applytheme()](#clink.applytheme), [settings.clear()](#settings.clear), [settings.parsecolor()](#settings.parsecolor), [settings.formatcolor()](#settings.formatcolor), [os.createguid()](#os.createguid).
- Added [git Lua APIs](#git) for use by custom prompts.
- Added optional `cookie` argument to [clink.promptcoroutine()](#clink.promptcoroutine) to make it simple for *.clinkprompt files to allow customization that makes use of asynchronous prompt filtering without needing modifications to the main *.clinkprompt file.
- Fixed detecting file associations (some file extensions weren't detected as having file associations, causing executable completion to omit them, and causing input line coloring to be inaccurate).
- Fixed a case where updating the right side prompt could leave stray characters behind.
- Fixed a case where the `match.coloring_rules` setting could have no effect.
- Fixed delay when typing `X:` and it's a remote drive.
- Fixed coloring `2>&1`; the `1` wasn't colored.
- Fixed color of leading blank lines in a prompt string (use the terminal's default color, not the `color.prompt` color).
- Fixed `rl.collapsetilde()` which just didn't do its job.
- Fixed `%clink_dummy_capture_env%` to stop accidentally leaking into the environment variables collection.
- Fixed an infinite loop when `prompt.async` was false.
- Fixed <kbd>F9</kbd> to stop jumping one past the actual entered history number.
- Fixed various edge case bugs in the input line display, which were uncovered while adding the ability to show input hints.
#### v1.6.21
- Reduced the performance overhead of hooked APIs from about 20 microseconds to about 2 microseconds.
- Enhanced the executable recognition to avoid flickering red (or `color.unrecognized`) for an executable name that was already recognized in a recent previous input line.
- Enhanced the `srcmap` command in the Lua debugger so that `srcmap dir` automatically sets up source mappings for Clink's built in scripts using `dir` as the repo root.
- Fixed when `history.expand_mode` is `off`; it didn't fully turn off all of the history expansion syntax forms (for example the `^` syntax).
- Fixed input line coloring when the first word is a device name (e.g. `nul` or `com1:`); it should use `color.unrecognized` for the color.
- Fixed [#651](https://github.com/chrisant996/clink/issues/651); completion doesn't work for `./` and `../` anymore in the first word of a command line. Now when the `match.translate_slashes` setting is `system` or `backslash` then completing `./` and `../` can complete the word as a path, even though CMD does not consider it to be a path.
- Fixed [#653](https://github.com/chrisant996/clink/issues/653); `clink_start.cmd` gets run twice if the binaries directory is the same as the profile directory.
- Fixed [#654](https://github.com/chrisant996/clink/issues/654); input line coloring doesn't treat `^` correctly inside quotes (and related quirks).
#### v1.6.20
- Fixed [#652](https://github.com/chrisant996/clink/issues/652); error when trying to update again after updating to v1.6.20 (regression introduced in v1.6.19).
#### v1.6.19
- Fixed truncated descriptions with `clink set exec.` and then `clink-select-complete` (<kbd>Ctrl</kbd>-<kbd>Space</kbd>) (regression introduced in v1.6.11).
- Fixed fully qualified paths from a different local drive accidentally being colored with `color.unrecognized`.
- Fixed [#648](https://github.com/chrisant996/clink/issues/648); on Windows 8.1 the title bar can get changed to "Windows PowerShell" for the rest of the CMD session.
#### v1.6.18
- Added a new callback function that can be assigned to an argument position in the table given to `:addarg()` via `onalias=` (see [Responding to Arguments in Argmatchers](#responsive-argmatchers) for more information). The git argmatcher in the [clink-completions](https://github.com/vladimir-kotikov/clink-completions) repo uses this to support git aliases.
- When a doskey alias doesn't include any `$` tokens then CMD is guaranteed to ignore the rest of the command line after the alias, so now argmatcher parsing also ignores the rest of the command line and colors it using `color.unexpected`.
- Suppress the ANSICON warning in the log file and diagnostics output on Windows 8.1. The performance problem in ANSICON exists, but apparently there isn't a better alternative before Windows 10.
#### v1.6.17
- Added warning in the log file and in `clink-diagnostics` (<kbd>Ctrl</kbd>-<kbd>x</kbd> <kbd>Ctrl</kbd>-<kbd>z</kbd>) when ANSICON is detected on Windows 8.1 or greater (it's unnecessary, less functional, and greatly degrades performance).
- Added language info in `clink-diagnostics` when the code page is not 1252 (for easier troubleshooting).
- Fixed finding argmatchers registered with exact names (typing `foo` couldn't find an argmatcher registered as `c:\dir\foo.exe` because it accidentally looked for `c:\dir\foo.EXE`).
- Fixed [#631](https://github.com/chrisant996/clink/issues/631); script error after `cmd ` when the current language is German.
#### v1.6.16
- Added a workaround for how [scoop](https://scoop.sh/) tries to control app versions and updates ([#615](https://github.com/chrisant996/clink/issues/615); scoop causes `clink autorun install` to use a wrong path).
- Added an `auto` mode for the `match.translate_slashes` setting. This mode makes completion translate all slashes in the completed word to match whichever kind occurs first in the word, or to the system path separator if there are no slashes yet (e.g. when completing a directory name).
- Changed the default to `auto` for the `match.translate_slashes` setting.
- Updated the `clink.slash_translation()` function.
- UNC share name completion works with forward slashes now (e.g. `//localhost/`).
- Added a `clink-toggle-slashes` bindable command, bound by default to <kbd>Ctrl</kbd>-<kbd>/</kbd>. The command toggles between forward and backslashes in the word at the cursor point, or in the <em>N</em>th word if a numeric argument is provided (e.g. by the <kbd>Alt</kbd>-Digit keys).
- Fixed the `off` mode for the `matches.translate_slashes` setting (regression introduced in v1.1.23).
- Fixed input line coloring of `@` in `for %a in (*) do @whatever`.
- Fixed crash in `glob-list-expansions` when used on an empty word (regression introduced in v1.3.36).
- Fixed wildcard completions when `match.wild` is on and `match.substring` is off.
- Fixed obscure edge case where match filtering with wildcards could potentially yield inaccurate results immediately after an auto-suggestion was offered.
#### v1.6.15
- Fixed hiding internal script names in the `clink-diagnostics` output (regression introduced in v1.6.11).
- Fixed [#613](https://github.com/chrisant996/clink/issues/613); wrong input line coloring for `cmd /c "command line"`.
#### v1.6.14
- Fixed `menu-complete` to respect `completion-auto-query-items`.
- Fixed missing line break before `dump-macros`, `dump-variables`, `clink-dump-functions`, and `clink-dump-macros` (regression introduced in v1.6.3).
- Fixed `rl.getbinding()` to return `clink-select-complete` instead of `clink-popup-complete` (the latter is just an alias; the real command name is `clink-select-complete`).
#### v1.6.13
- Popup lists can now be filtered.
- Press <kbd>F4</kbd> in a popup list to toggle the search mode between "find" and "filter".
- The `clink.popup_search_mode` setting controls the default search mode.
- The `clink.popuplist()` function can be told to start in a specific search mode.
- Added `os.findfiles()` to allow getting files/directories one at a time (versus `os.globfiles()` which collects the entire set all at once into a table).
- Added `exec.associations` setting to let Executable Completion include files with registered file associations as matches (e.g. launchable documents such as "*.pdf" files).
- Fixed <kbd>Ctrl</kbd>-<kbd>C</kbd> in a popup list copying the wrong entry after having used <kbd>Del</kbd> to delete an entry.
- Fixed input line coloring to use `color.executable` also for files included by the `exec.path` setting, if the files have registered file associations.
#### v1.6.12
- Fixed [#597](https://github.com/chrisant996/clink/issues/597); prompt shows leftover text sometimes (regression introduced in v1.6.10).
- Fixed [#596](https://github.com/chrisant996/clink/issues/596); it's easy to forget whether <kbd>Enter</kbd> in history list executes or inserts.
#### v1.6.11
- Added `os.setalias()` for setting a doskey alias without needing to invoke the doskey.exe program.
- Fixed a case where match descriptions could be displayed with incorrect padding and truncation.
- Lua debugging enhancements:
- Changed the built-in embedded scripts to include debug info, which allows some Lua error messages to be more useful for troubleshooting.
- Added `srcmap` command in the Lua debugger to override where to find source files.
#### v1.6.10
- Added an optimization to further reduce flicker when re-drawing the prompt.
- Added a `user_data.shared_user_data` table to allow linked argmatchers to share data with each other while an input line is being parsed (see [Responding to Arguments in Argmatchers](https://chrisant996.github.io/clink/clink.html#responsive-argmatchers) for details).
- Fixed [#579](https://github.com/chrisant996/clink/issues/579); popup lists could accidentally truncate text in the first column when there's only one column.
- Fixed [#576](https://github.com/chrisant996/clink/issues/576); setup exe doesn't remove old uninstall exe files.
- Fixed [#575](https://github.com/chrisant996/clink/issues/575); error when `color.executable` is set and `color.unrecognized` is not (regression introduced in v1.6.2).
#### v1.6.9
- Fixed [#574](https://github.com/chrisant996/clink/issues/574); `prompt.spacing` "eats" lines containing Unicode Surrogate Pairs such as for some [nerdfont](https://nerdfonts.com) icons (Windows Terminal accidentally returns that such lines are empty).
- Fixed [#573](https://github.com/chrisant996/clink/issues/573); C# was unable to read Clink's version resource.
- Fixed [#555](https://github.com/chrisant996/clink/issues/555); security advisory [CVE-2020-24370](https://github.com/advisories/GHSA-gfr4-c37g-mm3v) for a Lua bug.
#### v1.6.8
- Fixed [#571](https://github.com/chrisant996/clink/issues/571); error in clink.bat under some circumstances (regression introduced in v1.6.7).
#### v1.6.7
- Recognize the little-known `cmd /r` as a synonym for `cmd /c` so that Clink can optimize and skip injecting into a `cmd /r` process.
- Fixed displaying descriptions when they're left-justified (regression introduced in v1.6.6).
- Fixed `argmatcher:chaincommand("run")` to not find argmatchers for builtin CMD command names (since CMD doesn't get invoked in that case, so it won't get interpreted as a CMD command).
- Fixed `argmatcher:chaincommand()` to find an argmatcher for a builtin CMD command even if a directory exists with the same name (since CMD interprets that case as a CMD command).
- Fixed `argmatcher:chaincommand("cmd")` so when `exec.aliases` is enabled it can include aliases as completions.
- Fixed `argmatcher:addarg({loopchars="+", etcetc})` so that `-Q:+x` still gets parsed into two input words `-Q:` and `+x`.
- Fixed to parse `foo^ bar` as two words "foo" and "bar".
- Fixed to recognize `^echo` (etc) as a builtin CMD command name despite embedded `^` characters.
- Fixed [#570](https://github.com/chrisant996/clink/issues/570); fixed #569 more thoroughly, and `cd /d` cannot be used anywhere because it also requires command extensions.
#### v1.6.6
- Added `clink history --no-show-time` to allow omitting history timestamps even when the `history.time_stamp` setting is `show`.
- Fixed match display to not right justify descriptions when the screen isn't wide enough or when descriptions contain aligned columns (like `clink set` completions do since v1.6.3).
- Fixed `clink history` when output is redirected; strip any escape codes that might be embedded in the time format.
- Fixed [#569](https://github.com/chrisant996/clink/issues/569); `cmd /e:off` causes syntax error in clink.bat script.
- Fixed [#567](https://github.com/chrisant996/clink/issues/567); `clink history compact` accidentally deletes all timestamps.
- Fixed documentation error in Lua API Reference about `"w"` mode in `io.open()` and `io.sopen()` (the behavior was correct, but the documentation was inaccurate/unclear).
#### v1.6.5
- Added all match fields in the table of matches passed to the `clink.onfiltermatches()` callback function.
- Fixed stripping colors from strings (e.g. when displaying in popup lists); it didn't strip 8-bit and 24-bit colors correctly.
#### v1.6.4
- Added `rl_buffer:hassuggestion()` and `rl_buffer:insertsuggestion()` for direct access to inserting suggestions without invoking Readline commands.
- Added `clink.dirmatchesexact()` and `clink.filematchesexact()` which are the same as the non-`exact` variants, except these don't append a `*` to the search pattern. For example, `clink.filematchesexact("*.zip")` can collect exactly "\*.zip" file matches instead of "\*.zip\*".
- Added OS version info to `clink info`.
- Added UNC share name completion when using Executable Completion (the `exec.enable` setting).
- Fixed completing input `.` or `..` when the `exec.enable` setting is enabled.
- Fixed applying `colored-completion-prefix` when match display filtering is active or a match has a custom `display` field.
- Fixed the `exec.path` setting so it doesn't accidentally include directories if their names end with an executable extension such as `.exe`.
- Fixed finding an argmatcher registered with a full path (e.g. `c:\foo\bar.exe`) when a full path is entered without a drive letter (e.g. enter `\foo\bar.exe`).
- Fixed [#562](https://github.com/chrisant996/clink/issues/562); `clink autorun install` strips quotes by mistake.
#### v1.6.3
- **Breaking Change:** For the four <kbd>Ctrl</kbd>-<kbd>-</kbd> key combinations, Clink got the <kbd>Shift</kbd> key backwards and generated inaccurate input codes. And that broke the Readline/bash default key binding for `undo` (the Windows default key binding of <kbd>Ctrl</kbd>-<kbd>z</kbd> works fine). If your .inputrc file has bindings for any of the <kbd>Ctrl</kbd>-<kbd>-</kbd> key combinations then you can keep the keys working the same by updating the key bindings. You can even use the [`$if clink_version >= 1.6.3`](#if_clink_version) syntax in your .inputrc file to make it define the key bindings differently in different versions of Clink.
Key Combination | Old Code | New Code
-|-|-
<kbd>Ctrl</kbd>-<kbd>-</kbd> | `"\C-_"` or `C-_` | `"\e[27;5;189~"`
<kbd>Ctrl</kbd>-<kbd>Shift</kbd>-<kbd>-</kbd> | `"\e[27;6;189~"` | `"\C-_"` or `C-_`
<kbd>Ctrl</kbd>-<kbd>Alt</kbd>-<kbd>-</kbd> | `"\e\C-_"` or `"\M-\C-_"` or `M-C-_` or etc | `"\e[27;7;189~"`
<kbd>Ctrl</kbd>-<kbd>Alt</kbd>-<kbd>Shift</kbd>-<kbd>-</kbd> | `"\e[27;8;189~"` | `"\e\C-_"` or `"\M-\C-_"` or `M-C-_` or etc
- Completions for all `clink set` settings include the current value in the description field (e.g. type `clink set `<kbd>Alt</kbd>-<kbd>=</kbd> to see Clink settings and their current values).
- Fixed to differentiate between `undo` and `vi-undo` commands again (they do the same thing, but are technically different commands).
- Fixed `execute-named-command` to also accept <kbd>Ctrl</kbd>-<kbd>-</kbd> for `undo` (the emacs binding for undo).
- Fixed redisplaying multi-line prompts after using completion during `execute-named-command`.
- Fixed accidentally loading the history file twice on each prompt; now it loads once, as intended.
- Fixed another double-free and potential crash in the Readline library; after navigating through history entries and then editing a history entry, pressing <kbd>Ctrl</kbd>-<kbd>c</kbd> or <kbd>Ctrl</kbd>-<kbd>Break</kbd> could cause a crash or memory corruption (regression exposed by changes in Readline 8.2).
- Applied fixes for 6 Lua bugs, curated by [@goodusername123](https://github.com/goodusername123) (thank you!) from [Lua.org](https://lua.org/bugs.html):
- "Dead keys with nil values can stay in weak tables."
- "Expression list with four or more expressions in a 'for' loop can crash the interpreter."
- "Label between local definitions can mix-up their initializations."
- "Return hook may not see correct values for active local variables when function returns."
- "Suspended __le metamethod can give wrong result."
- "Wrong code generated for a 'goto' followed by a label inside an 'if'."
- Fixed the Lua debugger so 5-digit line numbers don't break indentation when showing source code lines.
#### v1.6.2
- Added optional argument `argmatcher:chaincommand(aliases)` to let the argmatcher know that the chained command will have doskey aliases expanded.
- Fixed match display potentially missing some matches (regression introduced in v1.6.1). In particular, git command completions were affected.
- Fixed command line input parsing so that the first word (the command word) `foo/` is interpreted as two words `foo` and `/` just like CMD does.
- Fixed [#549](https://github.com/chrisant996/clink/issues/549); `cd -` intercept interferes with `cd` doskey alias.
- Fixed [#546](https://github.com/chrisant996/clink/issues/546); in Windows 10 when "Wrap text output on resize" is unchecked or the Window Width is different from the Screen Buffer Width, then the display becomes garbled. The root cause is a limitation in how Windows 10 implements support for ANSI escape codes, but Clink now has workaround code that tries to compensate for the problems as much as possible (the terminal display will be a bit jittery, though; there's nothing that can be done about that).
- Fixed updating the display after using `clink-popup-show-help` to invoke a command that changes only the cursor position.
- Fixed a case where a custom strategy for auto-suggestions could accidentally skip inserting part of the suggestion.
- Fixed a race condition where `clink-diagnostics` could encounter an error while printing information about coroutines.
**Important pre-release changes in Readline:**
Readline 8.2 introduced a crash in the `undo` command after navigating through history and making edits in history entries. The following pre-release updates in Readline fix the crash and several related issues. They also fix many other edge-case stability issues, and add a couple of new features.
- Fixed crashes due to memory corruption in the undo information for editing operations.
- Fixed many issues found by Address Sanitizer (ASAN); these are edge cases where crashes or memory corruption or malfunctions or memory leaks occurred.
- Added new `execute-named-command` bindable command which reads a command name from the input and executes it (default is <kbd>Alt</kbd>-<kbd>x</kbd>).
- Allow `quoted-insert` into search strings.
- Repeated invocations of `vi-yank-pop` now cycle through the kill ring.
- Fixed when `do-lowercase-version` is bound to something that's not an uppercase letter.
- Fixed getting the value of the `active-region-start-color` config variable.
#### v1.6.1
**Features:**
- Improved input line parsing and coloring:
- Commands starting with `@` are supported, and completion correctly ignores the `@`.
- Each of the following CMD syntax errors are recognized: lines starting with `&` or `@2>`, and lines containing `& &` or `2>&file`.
- The whole redirections `2>file` or `>file` or `2>&1` are colored instead of only the `>` or `>&`.
- Completions for `clink set` color settings include a color sample in the description field (e.g. type `clink set color`<kbd>Alt</kbd>-<kbd>=</kbd> to see the color settings and their current color samples).
- The `clink-reload` bindable command now reverts key bindings and config variables before reloading the inputrc file, so that old bindings and values don't linger in the current session if they've been removed from the inputrc file.
- Added `clink-dump-functions` and `clink-dump-macros` bindable commands. These behave similar to `dump-functions` and `dump-macros`, but they show user-friendly key names and `luafunc:` macros are listed as functions instead of as macros.
- Added some new "bigword" cursor movement commands for moving to the next or previous space delimited word; `clink-backward-bigword`, `clink-forward-bigword`, `cua-backward-bigword`, `cua-forward-bigword`.
- Added a new conditional directive `$if clink_version` in the inputrc file (e.g. `$if clink_version >= 1.6.1`).
- Added a new `prompt.spacing` setting which can control blank lines before the prompt (it was a clink-flex-prompt feature which has now been incorporated into Clink itself).
- Added a new `match.coloring_rules` setting and `%CLINK_MATCH_COLORS%` environment variable, both of which supersede Readline's `%LS_COLORS%` definitions when displaying match completions.
- Internal changes.
**Lua:**
- Added `line_state:getrangeoffset()` and `line_state:getrangelength()` to get the beginning offset and length of the range in the input line described by the line_state.
- Added `console.explodeansi()` to split a string into substrings on ANSI escape code boundaries.
- Added `rl.getinputrcfilename()` to get the loaded inputrc file name.
- Added `rl.translatekey()` to translate between key sequence formats (input key, key binding, and friendly key name).
- Added `rl.bracketpromptcodes()` to apply `\1` and `\2` codes as needed by Readline in certain inputrc config variables.
- Document the `CLINK_EXE` global variable which has existed since v1.0.0 but was accidentally undocumented.
**Fixes:**
- Removed superfluous `;39` and/or `;49` from color setting escape codes in some cases.
- Fixed `console.readinput()` repeatedly returning nil after `console.checkinput()` returns true (regression introduced in v1.5.12).
- Fixed loading the `default_inputrc` file if it exists (introduced in v1.3.5, and it never worked properly until now).
- Fixed the `history-size` config variable to be completely ignored (it interfered with Clink's history database and settings, which were meant to supersede it).
- Fixed the `clink-popup-show-help` command when including unbound commands (numeric argument of 4) so it doesn't double-list the bound `luafunc:` macros.
- Fixed updating column text in `clink.popuplist()` when <kbd>Del</kbd> is pressed (e.g. history timestamps in the `clink-popup-history` command).
- Fixed the width of `clink.popuplist()` to take the title into account.
- Fixed Lua argument errors for some objects (the argument # in the error message was one lower than it should have been in some messages).
- Fixed the return value from `rl_buffer:setcursor()`.
- Fixed `console:getnumlines()` between onendedit and onbeginedit.
- Fixed erasing the "History expansion for" preview when the transient prompt is enabled.
- Fixed the transient prompt sometimes not erasing properly (regression introduced in v1.5.17).
- Fixed the color of flags for `clink set` (e.g. `--help`).
- Fixed the `clink-reload` command so any inputrc file parse errors are printed on new lines.
- Fixed the `lua.break_on_error` setting so it works properly in released builds of Clink.
#### v1.6.0
- Updated the Readline library to v8.2 patch 7 (the list here omits changes that were contributed to Readline from Clink, or which do not affect Clink).
- New features:
- History expansion better understands multiple history expansions that may contain strings that would ordinarily inhibit history expansion (e.g., `abc!$!$`).
- There is a new `fetch-history` bindable command that retrieves the history entry corresponding to its numeric argument. Negative arguments count back from the end of the history.
- There is a new option: `enable-active-region`. This separates control of the active region and bracketed-paste. It has the same default value as `enable-bracketed-paste`, and enabling bracketed paste enables the active region. Users can now turn off the active region while leaving bracketed paste enabled. (Note that bracketed paste is currently ignored in Clink.)
- Readline looks in `%LS_COLORS%` for a custom filename extension (`*.readline-colored-completion-prefix`) and uses that as the default color for the common prefix displayed when `colored-completion-prefix` is set, superseding the `so` type if both are present.
- Two new bindable string variables: `active-region-start-color` and `active-region-end-color`. The first sets the color used to display the active region; the second is unused and unnecessary in Clink, but exists anyway for compatibility. If set, these are used in place of terminal standout mode.
- Fixes:
- Fixed a problem with cleaning up active marks.
- Fixed a problem with arithmetic comparison operators checking the version in the inputrc file.
- Fixed a bug that could cause readline to crash if the application removed the callback line handler before readline read all typeahead.
- Added additional checks for read errors in the middle of readline commands.
- Fixed a problem with `unix-filename-rubout` that caused it to delete too much when applied to a pathname consisting only of one or more slashes.
- Fixed a couple problems where `transpose-words` could corrupt the end of the input line.
- Fixed an issue that caused a history line's undo list to be cleared when it should not have been.
- Fixed leaked memory from undo lists.
- When replacing a history entry, make sure the existing entry has a non-NULL timestamp before copying it; it may have been added by the application, not the history library.
- The `blink-matching-paren` setting works in Clink now.
- Completion works for UNC share names now (share names like `\\server\share`, not server names like `\\server`).
- Improved undo grouping for consecutive inserted text.
- Added `os.enumshares()` to enumerate the SMB UNC shares on a given server.
- Fixed Lua error messages from custom Lua libraries that report errors using table objects instead of strings.
- Fixed issue with the `autosuggest.hint` setting where it could apply incorrect input line coloring when the <kbd>Right</kbd> key isn't bound to one of the usual commands for that key.
- Internal changes and optimizations.
#### v1.5.18
- Fixed [#524](https://github.com/chrisant996/clink/issues/524) and [#523](https://github.com/chrisant996/clink/issues/523); garbled display in wide terminal windows (regression introduced in v1.5.14, which exacerbated and revealed a bug that's existed since Clink v1.0.0 alpha and which could intermittently garble Unicode text or escape sequences).
- Fixed the transient prompt sometimes not displaying properly (regression introduced in v1.5.17).
#### v1.5.17
- Reduced flicker when async prompt filtering redraws the prompt.
- When `_argmatcher:addarg()` or `_argmatcher:addflags()` is passed a table containing <code>nowordbreakchars="<span class="arg">chars</span>"</code> then the <span class="arg">chars</span> are not treated as word breaks for that argument index or for flags (see [Overcoming Word Breaks](#addarg_nowordbreakchars) for more information).
- Added a `user_data` argument to the custom classifier function for an argmatcher (set via `_argmatcher:setclassifier()`).
- Improved input line coloring for `clink set` so that `color.unexpected` is only used for a completed word that isn't a match.
- Fixed reading lines from stdin in Lua scripts (e.g. `io.stdin:read()`).
- Fixed accidentally showing matches in a single column sometimes even when there are no descriptions.
- Fixed an incomplete `clink inject` if an explicit or implicit `endlocal` happens after `clink inject` but before the prompt is shown (the injection didn't finish successfully until the next time an environment variable was set, but now it finishes immediately).
#### v1.5.16
- Fixed [#522](https://github.com/chrisant996/clink/issues/522); garbled display in JetBrains WebStorm terminal (regression introduced in v1.5.15).
- Fixing this required reverting the change that automatically chose a default for `color.suggestion` based on the current console colors.
- Fixed `:chaincommand()` so that generators and classifiers that come after argmatchers in the priority order receive the same `line_state` objects as ones that come before argmatchers in the priority order.
- Fixed `:setdelayinit()` with linked argmatchers; the callback function was only called for registered argmatchers (e.g. `clink.argmatcher("foo"):setdelayinit(func)`) and it wasn't called for linked argmatchers (e.g. `"-x" .. clink.argmatcher():setdelayinit(func)`).
- Fixed the word parser to recognize a single digit as a word when followed by punctuation.
- Fixed `loopchars` for characters like `-` or `*` that are also Lua pattern characters.
#### v1.5.15
- Added localized descriptions for flag completions in `cmd`, `cd`, and `rd`.
- Added partial ability to detect light/dark console color themes:
- Added `console.getcolortable()` which returns a table with the console's current 16 predefined colors. When possible, the table includes a field indicating whether the current console color theme is a light or dark theme.
- At this time, the colors can be accurately retrieved only when using the legacy conhost terminal. When using Windows Terminal, ConEmu, or other ConPty-based terminals there is currently no way to accurately retrieve the colors. Once the [Terminal#10639](https://github.com/microsoft/terminal/issues/10639) issue is fixed then Clink will also detect the background color in these terminal programs.
- Changed the default for `color.suggestion` so that it attempts to detect light themes (bright background colors) when possible, and it attempts to automatically choose a default color for suggestions that is faint but has sufficient contrast to be readable.
- Fixed the `onlink` callback function in `:addflags()` so that the `arg_index` parameter is correctly `0` instead of `1`.
- Fixed the upper bound line number for Lua console line API functions.
- Fixed `console.getlinetext()` when emojis are present.
#### v1.5.14
- Added a visible usage hint for [Auto-Suggestions](#gettingstarted_autosuggest) to help make the feature more discoverable and usable. The usage hint can be hidden by turning off the `autosuggest.hint` setting.
- Added new callback functions that can be assigned to an argument position in the table given to `:addarg()` via `onadvance=` and `onlink=` (see [Responding to Arguments in Argmatchers](#responsive-argmatchers) for more information).
- Fixed displaying match descriptions containing embedded color codes.
- Fixed finding argmatchers for doskey alias names containing quotes.
- Fixed parsing the input line when a doskey alias references a command with an argmatcher that uses the `:chaincommand()` function (e.g. an alias `foo=sudo dir $*` with an argmatcher like `clink.argmatcher("sudo"):chaincommand()` so that completions and input line coloring work properly for the rest of the input line).
- Fixed the `exec.commands` setting with an argmatcher that uses the `:chaincommand()` function.
- Fixed `_argmatcher:setclassifier()` so the custom classifier is called for flags as well as for arguments.
#### v1.5.13
- Added `clink.onhistory()` to register a function to be called when the input line has been accepted and is about to be added to history (and optionally cancel adding it).
- Fixed `history delete` with a negative number so it indexes backwards from the end, as advertised.
- Fixed calling `clink.refilterprompt()` from a coroutine, and related fixes to ensure various Lua functions coexist properly with coroutines.
- Fixed [#520](https://github.com/chrisant996/clink/issues/520); add a link to the Releases page in the updater dialog box.
#### v1.5.12
- Fixed updating the input line display after using `clink-popup-history` or `win-popup-history` (regression introduced in v1.5.3; the fix in v1.5.4 was incomplete).
- Fixed `console.checkinput()` so it doesn't eat whatever pending input it detects.
- Fixed the updater to be more specific about what PowerShell cmdlet it invokes, in case a module replaces the built-in `Expand-Archive` cmdlet.
#### v1.5.11
- Fixed prompt filters and other Lua coroutines when `color.executable` and `color.unrecognized` are both empty (regression introduced in v1.5.10).
#### v1.5.10
- Changed `clink update` to consider "up-to-date" as a successful case.
- Fixed a case where the `completion` auto-suggest strategy could be temporarily prevented from providing a suggestion (regression introduced in v1.4.22).
- Fixed leaked memory when showing history expansion previews.
- Fixed [#511](https://github.com/chrisant996/clink/issues/511); `!` doesn't need to be treated as a word break character.
- Internal changes.
#### v1.5.9
- Added default key binding <kbd>Alt</kbd>-<kbd>Ctrl</kbd>-<kbd>Up</kbd> for `clink-popup-history`.
- Fixed the `match.max_rows` setting to control the number of rows of items (instead of the total number of rows including description rows).
- Fixed [#509](https://github.com/chrisant996/clink/issues/509); crash when using `clink-popup-history` if `history.time_stamp` is `off` (regression introduced in v1.5.7).
#### v1.5.8
- Fixed [#504](https://github.com/chrisant996/clink/issues/504); the `clink.autoupdate` setting behaves like `auto` even when it's set to `check` (regression introduced in v1.5.5).
- Fixed [#503](https://github.com/chrisant996/clink/issues/503); the updater could hang if any additional CMD instances were started while the "Clink Update" prompt window was open (regression introduced in v1.5.5).
#### v1.5.7
- Added vertical scrollbars in `clink-select-complete` and in popup lists.
- Added `terminal.scrollbars` setting which can disable the vertical scrollbars (e.g. according to preference, or if a terminal or font is incompatible with extended Unicode box drawing characters).
- Added `clink set --info` flag.
- Added language-related diagnostic info in `clink info`.
- Added minor optimization when displaying prompt text.
- Added enhancements in the pager used when displaying help or matches; <kbd>Tab</kbd> or <kbd>Space</kbd> or <kbd>Y</kbd> print the next page, <kbd>D</kbd> prints the next half-page, <kbd>Enter</kbd> prints the next line, <kbd>N</kbd> or <kbd>Q</kbd> stop printing, and <kbd>?</kbd> shows the available keys in the `-- More --` pager prompt (the enhancements were accidentally lost in v1.1.1-alpha).
- Horizontal scrolling in popup lists works for all columns, if text doesn't fit in the column.
- Fixed crash in `rl.getmatchcolor(match, type)`; when the optional `type` parameter was passed in, the API could crash.
- Fixed [#498](https://github.com/chrisant996/clink/issues/498); when `autosuggest.enable` is False, cycling or searching through history and then pressing <kbd>Right</kbd> does nothing (regression introduced in v1.5.4).
- Internal improvements.
#### v1.5.6
- Added `os.getpushddepth()`, which works when `%PROMPT%` contains exactly one `$+`.
- The `clink-popup-history` and `win-history-list` commands show timestamps when `history.time_stamp` is set to `show`.
- Fixed `os.geterrorlevel()` when `cmd /u` was used.
- Fixed word break parsing in the input line when certain Unicode characters are present.
- Fixed Unicode string conversions to disallow translating to "similar" characters (which could be problematic in filenames).
- Fixed a crash in `rl.getkeybindings()` if it's called by a Lua script running inside `clink set`.
- Fixed Lua debugger input if a script error occurs inside `clink set`.
- Fixed a width quirk in `clink-select-complete` where typing to narrow the list to a single item accidentally made the column width at least 3 characters, even if the item was only 1 or 2 characters width.
- Fixed `clink history` to handle escape codes embedded in the `history.time_format` setting.
- Fixed a potential crash after using `remove-history` at the beginning of the history list.
- Fixed [#494](https://github.com/chrisant996/clink/issues/494); Lua error when using `unicode.fromcodepage()` (reported and fixed before the bug was published).
- Fixed [#493](https://github.com/chrisant996/clink/issues/493); `clink-select-complete` displays the selected item incorrectly if both `colored-stats` and `colored-completion-prefix` are `off` (regression introduced in v1.5.5).
#### v1.5.5
- Changed the `clink.autoupdate` setting to allow `off`, `check` (the default), `prompt`, and `auto` for more control over how and when updating happens. When set to `prompt` or `auto` Clink can trigger updates automatically, so you don't need to even run `clink update`.
- Enhanced `debug.log_terminal` to include low level console keyboard and mouse input events.
- Fixed `debug.log_terminal` to capture all input (regression introduced in v1.5.2).
- Fixed slowness during `clink-select-complete` while typing, caused by excessive match generation.
- Fixed selection highlight in `clink-select-complete` when the whole match text has been typed.
- Fixed [#486](https://github.com/chrisant996/clink/issues/486); window title escape code doesn't work properly if it contains emojis or UTF8 content.
- Internal changes.
#### v1.5.4
- Further contrast improvements for default colors to be readable in both Dark and Light terminal themes.
- Added `arginfo` field in `builder:addmatches()` and in match display filtering.
- Auto-suggestions are no longer shown while searching history; it was too distracting and confusing.
- Fixed updating the input line display after using `clink-popup-history` or `win-popup-history` (regression introduced in v1.5.3).
- Fixed `old-menu-complete` and `menu-complete` when there's only one match. The first time it should insert the match, and subsequent times should ding instead of cycling through the same match over and over and requiring an equal number of `undo` to undo.
- Fixed match display filtering to support the `match.substring` setting.
- Fixed match display filtering to support the `files.system` setting.
- Fixed the cursor position if match display filtering happens the first time `clink-select-complete` is used in a session.
- Fixed a case where two `undo` were required to fully undo what `menu-complete` inserted.
- Fixed <kbd>Esc</kbd> during incremental history search mode so it cancels the search.
- Fixed input line coloring after `non-incremental-reverse-search-history` or `non-incremental-forward-search-history` finds an exact match for the search text (since v1.1.5).
- Internal changes and optimizations.
#### v1.5.3
- Added `builder:setfullyqualified()` to force completions to be inserted as fully qualified path names.
- Completions for <code>clink set <span class="arg">setting_name</span> <span class="arg">input</span></code> use fully qualified path names for <span class="arg">input</span>. This helps avoid accidentally setting relative paths in global settings; since the current directory changes frequently, setting relative paths usually leads to unintended consequences.
- Only load a script from a `completions\` directory if the associated command exists in the file system. Also, pass the fully qualified file name as input to the script (in Lua, use `...` to get script arguments, e.g. `local command = ...`).
- `clink info` now reports whether Clink is injected.
- Improve efficiency of updating the input line display. This eliminates some redundant processing in the Readline library and in Clink.
- Fixed input line parsing and coloring when the `doskey.enhanced` setting is off or when doskey macro expansion is suppressed.
- Fixed `line_state:getwordinfo()` to accurately set the `.alias` field when the `doskey.enhanced` setting is off or when doskey macro expansion is suppressed.
- Fixed coloring the command word in the command line when queued keys select and accept a command line from history instantly (it could accidentally continue without applying the appropriate coloring).
- Fixed script error in `clink.filematches(nil)` and `clink.dirmatches(nil)`; they were meant to behave the same as passing an empty string.
#### v1.5.2
- Adjusted the colors in "Use enhanced defaults" to have sufficient contrast to be readable in both Dark and Light terminal themes.
- More reliably detect whether hosted in Windows Terminal, and even when Windows Terminal is set as the default terminal application.
- Fixed crash in `clink.popuplist()` when the `current` argument is past the end of the list of items.
- Fixed cursor location when the input line contains embedded CTRL characters.
- Fixed [#474](https://github.com/chrisant996/clink/issues/474); pasting is slow in Windows Terminal and ConEmu.
- Fixed [#470](https://github.com/chrisant996/clink/issues/470); typo in help text.
#### v1.5.1
- Added `rl.getcommandbindings()` to get info about a command, including the key(s) bound to it, if any.
- Changed to also allow `clink.popuplist()` inside a function registered by `clink.onfiltermatches()`.
- Changed console input mode handling to more aggressively clear `ENABLE_VIRTUAL_TERMINAL_INPUT` since it interferes with input (especially <kbd>Ctrl</kbd> key combinations) and some console programs set it but accidentally neglect to clear it when they're finished.
#### v1.5.0
- Added code-signing.
- Added note after successful `clink update` to clarify that the update will take effect in new Clink windows.
- Fixed order of running the autostart script (from the `clink.autostart` setting) vs loading Lua; the autostart script should run before Lua so that Lua scripts can query environment variables set by it. Otherwise Lua scripts may behave differently on initial load versus after invoking the `clink-reload` command (e.g. <kbd>Ctrl</kbd>-<kbd>x</kbd> <kbd>Ctrl</kbd>-<kbd>r</kbd>).
- Fixed precedence of match colors; readonly should be lower precedence than executable.
- Fixed [#469](https://github.com/chrisant996/clink/issues/469); incorrect usage of `memset()`.