Last active
February 23, 2022 15:47
-
-
Save Kvieta1990/d838510fc573bebaf8daf01d83f28032 to your computer and use it in GitHub Desktop.
Windows DOS profile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load(io.popen('oh-my-posh --config="C:/Users/yuanp/AppData/Local/Programs/oh-my-posh/themes/ohmyposhv3-v2.json" --init --shell cmd'):read("*a"))() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
Title DOS | |
for %%* in (.) do set ADDRESS= %%~n* | |
prompt $E[1;30;40m[$E[1;35;40mZYP$E[1;34;40m-$E[1;32;40mDOS $E[1;31;40m@ $E[1;36;40m$d$E[1;30;40m]$E[1;31;40m$$$s$E[1;37;40m | |
:: Temporary system path at cmd startup | |
:: set PATH=%PATH%;"C:\Program Files\Sublime Text 2\" | |
call conda activate | |
:: Commands | |
DOSKEY la=wsl ls -al | |
DOSKEY lat=wsl ls -alth | |
DOSKEY lar=wsl ls -altrh | |
DOSKEY rr=wsl rm -rf | |
DOSKEY pwd=wsl pwd | |
DOSKEY vi=vim $* | |
DOSKEY subl=sublime_text $* | |
DOSKEY pr=sublime_text D:\Documents\Configs\profiles.cmd | |
DOSKEY open=explorer $* | |
DOSKEY ca=conda activate $* | |
DOSKEY da=conda deactivate | |
:: Common directories | |
:: DOSKEY gd=cd D:\GooDrive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Refer to the following links for configuring Windows CMD to load profile on startup,
https://jack-kawell.com/2020/03/18/create-bashrc-files-for-command-prompt-and-powershell-in-windows/
https://www.notion.so/iris2020/Create-bashrc-files-for-Command-Prompt-and-PowerShell-in-Windows-Jack-Kawell-69f7096761c1443ba2117ce7024f6dfb
Refer to the following link for details about configuring
ohmyposh
with Windows CMD,https://ohmyposh.dev/docs/windows
Sometimes, the autorun function of clink will not be working, in which case, we need to manually inject clink into a starting CMD session. To do this, add the following link to the profile file,