Supercharge Windows Command Prompt with Starship and Clink
For a while I have been using Oh My Posh forever in PowerShell. But I wanted to have same sort of info in Command Prompt (CMD). Yes I am traditional that way...
Starship allows me to have same configuration in Windows CMD, PowerShell on Windows and Linux, bash in WSL or Linux shell.
Unlike PowerShell and bash, CMD doesn't really have concept of profile, i.e. .bashrc or .bash_profile.
In past this could be archived with Autoexec.bat under DOS or DOS based Windows (Windows 95/98/ME). On modern Windows you can still have C:\AutoExec,bat, but it can only set variables and ignore anything else.
Under modern Windows you can execute programs when you start CMD, but Starship need to have more control over CMD.
But somehow CLink can create a hook in CMD and introduces concept of profiles and other nifty things to CMD.
-
winget install chrisant996.Clink -
winget install Starship.Starship Configure CLink to inject Starship
Create new
%LocalAppData%\clink\starship.luafileAdd following to the
starship.luafileload(io.popen('starship init cmd'):read("*a"))()
Create
%userprofile%\.config\starship.tomlfile
Note: Starship is best used with Windows Terminal.