Clink

Discuss anything related to portable freeware here.
Post Reply
Message
Author
User avatar
I am Baas
Posts: 4150
Joined: Thu Aug 07, 2008 4:51 am

Clink

#1 Post by I am Baas »

Powerful Bash-style command line editing for cmd.exe
http://mridgers.github.io/clink/

Dl portable version @ https://github.com/mridgers/clink/relea ... _0.4.2.zip

User avatar
Midas
Posts: 6710
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Clink

#2 Post by Midas »

Sometime ago I tested Clink, found out it was not really portable (don't ask), and forgot it...

User avatar
Midas
Posts: 6710
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Clink

#3 Post by Midas »

Clink v0.4.6 released (still claims portability; changelog is at http://github.com/mridgers/clink/releases).

User avatar
lintalist
Posts: 434
Joined: Sat Apr 19, 2014 12:52 am
Contact:

Re: Clink

#4 Post by lintalist »

A fork, with many changes and actively developed:
https://github.com/chrisant996/clink, currently at v1.5.1

Changes https://chrisant996.github.io/clink/clink.html#changes

Portable Configuration @ https://chrisant996.github.io/clink/cli ... figuration
Here's how you can set up a portable configuration for Clink:

1. Put your Lua scripts and other tools in the same directory as the Clink executable files. For example fzf.exe, z.cmd, oh-my-posh.exe, starship.exe etc can all go in the same directory on a flash drive or network share.
2. Make a batch file such as portable.bat that injects Clink using a specific profile directory.
* On a flash drive, you can have a portable profile in a subdirectory under the Clink directory.
* On a network share, you'll want to copy some initial settings into a local profile directory (a profile directory on a network share will be slow).
3. In any cmd.exe window on any computer, you can then run the portable.bat script to inject Clink and have all your favorite settings and key bindings work.

Here are some sample scripts:

portable.bat (on a flash drive)

This sample script assumes the portable.bat script is in the Clink directory, and it uses a clink_portable profile directory under the Clink directory.

Code: Select all

@echo off
rem -- Do any other desired configuration here, such as loading a doskey macro file.
call "%~dp0clink.bat" inject --profile "%~dp0clink_portable" %1 %2 %3 %4 %5 %6 %7 %8 %9
portable.bat (on a network share)

This sample script assumes the portable.bat script is in the Clink directory, and that there is a file portable_clink_settings with the settings you want to copy to the local profile directory.

Code: Select all

@echo off
if not exist "%TEMP%\clink_portable" md "%TEMP%\clink_portable" >nul
if not exist "%TEMP%\clink_portable\clink_settings" copy "%~dp0portable_clink_settings" "%TEMP%\clink_portable\clink_settings" >nul
rem -- Do any other desired configuration here, such as loading a doskey macro file.
call "%~dp0clink.bat" inject --profile "%TEMP%\clink_portable" %1 %2 %3 %4 %5 %6 %7 %8 %9

Post Reply