I recently installed Clink and I'm quite happy with the history being kept in between session and the ability to search history using Ctrl+R / Ctrl-S.

However, I would very much like to have access to the full list of commands that Clink currently has, much like the history command on *nix system.

Despite what I consider thorough online search, I've not found any Clink hotkey or script to do so. If anyone has a working solution for that, I'd be very interested to hear about it.

  • Workaround: In clink_profile/settings set history_io=1 to sync all history to file; and then, cat clink_profile/.history – mosh Aug 26 '16 at 12:13
  • what is the actual path of clink_profile? – joce Sep 9 '16 at 18:50
  • there is a "settings" file insidea a folder called "profile" inside the folder where clink is installed, usually c:\Program Files (x86)\clink\profile\settings – Ivan Castellanos Oct 3 '16 at 23:08
  • 1
    Hum. No. :-( I have C:\Program Files (x86)\clink\0.4.8\<a bunch of files> but no profile folder or settings file in there. – joce Oct 5 '16 at 15:26
  • @joce type the command 'clink set' to find the settings and profile folder. – mosh Dec 7 '17 at 13:50

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

  • Perfect, this helped me to find the old commands i was looking for :) – Larzan Jan 27 '17 at 12:16
  • Create a bat file with the first command called history. Sorted – regisbsb Mar 27 '17 at 13:22

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

  • Indeed. Now, the question is: Is there a lua script floating somewhere that implement that feature? – joce Dec 29 '15 at 20:51
  • That's probably for you to do ;). – David Dec 29 '15 at 21:14
  • Yeeeah... That's what I feared. And that's why I hoped someone would already have done it. :-/ Ho well. – joce Dec 29 '15 at 21:16
  • Yay! It has been fixed! Time to update your answer! – xverges Dec 21 '17 at 8:33

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
)

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.