Logo

dev-resources.site

for different kinds of informations.

Install Oh-My-Posh On Windows Command Prompt (cmd) Via Clink

Published at
3/14/2024
Categories
cmd
windows
ohmyposh
clink
Author
emdadr
Categories
4 categories in total
cmd
open
windows
open
ohmyposh
open
clink
open
Author
6 person written this
emdadr
open
Install Oh-My-Posh On Windows Command Prompt (cmd) Via Clink

If you are a fan of CMD and want the beauty of oh-my-posh but you do not want to switch to Windows PowerShell so you on the right place

The problem is that CMD directly does not support oh-my-posh on it so that's why we need to do via Clink

plan old CMD

Let's Start ๐Ÿ˜บ:

Step : 1

First of all we need to install oh-my-posh

winget install JanDeDobbeleer.OhMyPosh -s winget
Enter fullscreen mode Exit fullscreen mode

this commdand will install these things

oh-my-posh.exe - Windows executable
themes - The latest Oh My Posh

after installing oh-my-posh you should restart your Terminal for the path to be set

if the path does not automatically set you can do manual by copying the bin path of oh-my-posh and adding it as new path in Edit the system environment variables

Step 2 :

Now Download & Install CLink from
Clink

after installing clink open new Terminal you see some Changes

As you know that cmd directly does not support oh-my-posh on it
so Clink ๐Ÿ‘

Step 3 :

Now we need find the path to Clink scripts directory which we can do by running this command

clink info

after running this you will get path to a lot of Clink associated but you need to select the path script

Path to Clink scripts directory

in the case of this image C:\User\WS\AppDate\Local\Clink is the path to scripts directory yours will be something similar

Step 4 :

Opening or going to Clink scripts directory

there you need to create a file named oh-my-posh.lua

oh-my-posh lua file

Step 5 :

Open that file and and write or copy & past the following

load(io.popen('oh-my-posh.exe --config="C:/Users/me/jandedobbeleer.omp.json" --init --shell cmd'):read("*a"))()
Enter fullscreen mode Exit fullscreen mode

here you should replace this C:/Users/me/jandedobbeleer.omp.json config with your own configuration.

Step 6 :

Restart you terminal or cmd then your good to go

you might not have the best experiences with but it is something or you might do it better than me

omp with cmd

Thank You โค๏ธ

Thank you for giving me the honor to let you know how to do the thing i am very grateful to you

Reference ๐Ÿ˜Š

And am thankful to all the people who worked on the product, documents and the problems & issues with it

Oh-My-posh Windows install
Clink downalond link
Change your prompt from PowerShell to CMD
config oh-my-posh with Clink
using git-posh or/and oh-my-posh with Command Prompt(cmd, not Powershell) inside windows terminal
oh-my-posh Support for CMD

cmd Article's
30 articles in total
Favicon
Windows ไธŠ VSCode ็š„ C/C++ ๅปถไผธๆจก็ต„่™•็†็ทจ็ขผ็š„ๅ•้กŒ
Favicon
TryHackMe | Windows Command Line | RSCyberTech
Favicon
50+ Most Useful CMD Commands to Boost Your Windows Productivity
Favicon
Video: Enable IIS using CMD and PowerShell
Favicon
Video: List All Available Windows Features on Windows 11 using CMD & PowerShell
Favicon
๐Ÿš€ Arch Linux Cheat Sheet: Essential Commands for new Users
Favicon
RIME Input | curl: (6) Could not resolve host: raw.githubusercontent.com
Favicon
Rename Multiple Files in Sequence with Just One Click Using PowerShell in Windows! ๐Ÿš€
Favicon
Maximizing IT Service Excellence with ServiceNow CMDB
Favicon
๐Ÿ‘understanding windows Command Line Interface
Favicon
Comandos Avanzados
Favicon
Comandos de Red
Favicon
Comandos de Fecha
Favicon
Comandos para Manipular Archivos y Directorios
Favicon
Tech notes 02 - Most Important Command Line Notes
Favicon
Comandos Bรกsicos
Favicon
Bash Scripting Fundamentals
Favicon
Decoding the Linux Command Line: 75 Indispensable Utilities Explained
Favicon
How to restore a Mysql backup with XAMP
Favicon
Remotely Control Raspberry Pi via SSH from External Network
Favicon
SSH Raspberry Pi via Cell Phone
Favicon
Enhancing Internet Speed Through CMD Commands
Favicon
Install Oh-My-Posh On Windows Command Prompt (cmd) Via Clink
Favicon
Important CMD Commands
Favicon
Title: A Beginner's Guide to Command-Line File and Directory Manipulation
Favicon
Mastering Deployments in Kubernetes
Favicon
SetEnv ๅทฅๅ…ท็จ‹ๅผ
Favicon
My K8s Cheatsheet
Favicon
Membuat Database Melalui CMD Pada Laragon
Favicon
Perbedaan perintah RUN dan CMD di dalam Docker

Featured ones: