-
-
Save pyohei/d85d9b17dcba2fe7c23b399322e4460d to your computer and use it in GitHub Desktop.
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 | |
chdir %* | |
set BRANCH= | |
for /f "eol=; tokens=1,2 delims== " %%i in ('"git branch 2>NUL"') do if "%%i"=="*" set BRANCH=%%j | |
if "%BRANCH%" neq "" ( | |
set PROMPT=$P^(%BRANCH%^)$G | |
) else ( | |
set PROMPT=$P$G | |
) | |
rem 設定方法 | |
rem | |
rem https://mattn.kaoriya.net/software/why-i-use-cmd-on-windows.htm | |
rem | |
rem ここ見て init.cmd が使える様にして、init.cmd の中に以下を追加 | |
rem doskey cd=gitcd $* | |
rem ※ gitcd.bat は本ファイル |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment