Getting the list of command history using Clink

Workaround:

type "%LOCALAPPDATA%\clink\.history"

But by default clink writes history only on exit, to change it:

clink set history_io 1

or modify history_io value in %LOCALAPPDATA%\clink\settings


For this I use a history.bat file:

rem Batch file that provides bash history like list with numbered items
@echo off
setlocal EnableDelayedExpansion
set lno=1
for /F "delims=" %%h in ('type "%LOCALAPPDATA%\clink\.history"') do (
    echo !lno!: %%h
    set /A lno= !lno! + 1
)

According to this bug report, it clink does not have a history command feature.