Clink

Submit command line tools that you find 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: 6879
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: 6879
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: 453
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

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

Re: Clink

#5 Post by lintalist »


User avatar
Hangar0
Posts: 72
Joined: Thu Mar 10, 2016 11:05 am

Re: Clink

#6 Post by Hangar0 »

.. clink with "curl --progress-bar" .. this doesn't look like it should.. :shock: :mrgreen:
.
.
Image
.
.
Image

User avatar
vevy
Posts: 807
Joined: Tue Sep 10, 2019 11:17 am

Re: Clink

#7 Post by vevy »

I think it should be moved to CLI submissions. Also, I have been using it portably for a while inject -p <profile-path>

User avatar
vevy
Posts: 807
Joined: Tue Sep 10, 2019 11:17 am

Re: Clink

#8 Post by vevy »

Hangar0 wrote: Sun Sep 15, 2024 9:39 am .. clink with "curl --progress-bar" .. this doesn't look like it should.. :shock: :mrgreen:
This reminds me of an option in sed: -u for unbuffered output and also --newline in a certain MeCylinder fetching tool :wink:

User avatar
Andrew Lee
Posts: 3112
Joined: Sat Feb 04, 2006 9:19 am
Contact:

Re: Clink

#9 Post by Andrew Lee »

Moved to "CLI Submissions" as suggested by vevy

Post Reply