Showing git branch in ConEMU

前端 未结 5 699
别跟我提以往
别跟我提以往 2021-02-08 07:04

Is there a way to show the branch in git somewhere visually (background or similiar) in ConEmu?

5条回答
  •  忘了有多久
    2021-02-08 07:53

    To sum up the situation is:

    I know sh.exe can do this but needed to check if it is in the Git\bin folder and have access by only writing sh in command line.

    First I saw sh.exe in Git\bin folder but wanted to see if I can execute on command line. To see it I checked environment vars using by echo %path% It was complicated to see if there is. I used powershell script and there is :)

    I would have execute sh in command line too :)))

    Refrences:

    • powershell where
    • split environment variables (path)

    Codes:

    echo %path%
    ($env:Path).split(";") | where ({$_ -like "*Git*"})
    

提交回复
热议问题