Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: chrisant996/clink
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.7.6
Choose a base ref
...
head repository: chrisant996/clink
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
20 changes: 20 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -2,6 +2,26 @@

### Releases from [chrisant996/clink](https://github.com/chrisant996/clink) fork

#### 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 <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).
4 changes: 3 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
@@ -20,6 +20,8 @@ _This todo list describes ChrisAnt996's current intended roadmap for Clink's fut
- Some wizard for interactively binding/unbinding keys and changing init file settings; can write back to the .inputrc file.

## Low Priority
- Option for the installer to add the Clink directory to the system PATH? **WARNING:** The main problem is about All Users...
- I'd love to let the installer run without Admin privilege, but I don't see how to do that safely because of the need for updating All Users AutoRun.
- Windows Terminal now has 3 ways of measuring character widths. There's no way for Clink to ask which mode is being used (but it might be possible to deduce on the fly using techniques from the wcwidth-verifier repo). The wcwidth updates in Clink are consistent with the "Grapheme clusters" mode. If the "wcswidth" and "Windows Console" modes turn out to be worth supporting, then that would require a bunch of extra work and configuration.
- Find a high performance way to detect git bare repos and encapsulate it into a Lua function?
- `clink_reset_line` still causes UNDO list leaks. `UP` until `sudo where`, then `asdf`, then `ESC`, then `ENTER`. May take several repititions; may repro quicker when varying which history entry is recalled.
@@ -51,7 +53,7 @@ _This todo list describes ChrisAnt996's current intended roadmap for Clink's fut
- [Made Lua's os.glob*() work like an iterator instead of building a table](https://github.com/mridgers/clink/commit/13fc3b68046d2cee0f2188b9c8d54fa0cbc18718)
- [os.glob*() tests](https://github.com/mridgers/clink/commit/5cfacee2a2b8230968854bc94bc3e1adf6b56bf9)
- [Fixed "cd \\" Lua error](https://github.com/mridgers/clink/commit/d2ffed58f75597cec08d85e8abf4fafc0b60a067)
- [builder::addmatches() now also accepts a function](https://github.com/mridgers/clink/commit/6a2b818efd84377b3a625bb1ecdeffe89da20cd6) -- This is inconsistent with `argmatcher:addflags()` and `argmatcher:addarg()`, and is generally non-intuitive.
- [builder::addmatches() now also accepts a function](https://github.com/mridgers/clink/commit/6a2b818efd84377b3a625bb1ecdeffe89da20cd6) -- This is inconsistent with `argmatcher:addflags()` and `argmatcher:addarg()`, and is generally non-intuitive. Also, beware -- it has a significant bug: when given a table or function, it returns 2 _without actually pushing 2 args_, which corrupts the stack and will cause failures.
- [Use AppData/Local for a the DLL cache as temp can get cleaned](https://github.com/mridgers/clink/commit/8ed3cb0b427970c8082acb238071b26d5e788057) -- Getting cleaned is desirable. Otherwise DLL versions accumulate without bound.
- [Don't expect the user to account for a null terminator](https://github.com/mridgers/clink/commit/4583281d464933d9ce021aedcdf3edc5e3fdc189) -- This still requires the user to account for a null terminator, by removing the space for the null terminator, otherwise the block gets sized differently than expected (and can have extra slop allocated).
- Removing all copyright dates seems problematic. Isn't it required in copyright notices? And in the program logo header it provides date context for the program version being used.
24 changes: 24 additions & 0 deletions clink/app/scripts/commands.lua
Original file line number Diff line number Diff line change
@@ -84,13 +84,37 @@ function clink._popup_show_help(rl_buffer)
end
end

--------------------------------------------------------------------------------
function clink._diag_loaded_scripts(arg)
arg = (arg and arg >= 9)
if not arg or not clink._loaded_scripts then
return
end

local bold = "\x1b[1m" -- Bold (bright).
local norm = "\x1b[m" -- Normal.

local any = false

clink.print(bold.."loaded scripts:"..norm)
for i,chunkname in ipairs (clink._loaded_scripts) do
clink.print(" "..i.." = "..chunkname)
any = true
end

if not any then
clink.print(" no scripts loaded")
end
end

--------------------------------------------------------------------------------
function clink._diagnostics(rl_buffer)
local arg = rl_buffer:getargument()
clink._diag_coroutines()
clink._diag_refilter()
clink._diag_events(arg) -- When arg >= 1 or lua.debug is set.
if arg then
clink._diag_loaded_scripts(arg) -- When arg >= 9.
clink._diag_argmatchers(arg) -- When arg >= 2.
clink._diag_prompts(arg) -- When arg >= 1 or lua.debug is set.
clink._diag_generators(arg) -- When arg >= 3.
Loading