using posh-git with conemu

1

I tried doing what the fellow at this site managed:

https://github.com/rajmenon/KB/wiki/Setup-a-ConEmu-task-for-posh-git--(w--Github-for-windows)

doing the same as he using the keybind in conemu results in

'`powershell' is not recognized as an internal or external command,                                                                                                            
operable program or batch file.                                                                                                                                                


Current directory:                                                                                                                                                             
C:\Users\c                                                                                                                                                                     

Command to be executed:                                                                                                                                                        
"C:\Windows\system32\cmd.exe" /C `powershell -noexit -command Set-ExecutionPolicy bypass;.$env:LocalAppData\GitHub\shell.ps1;.$env:github_posh_git\profile.example.ps1         


ConEmuC: Root process was alive less than 10 sec, ExitCode=1.                                                                                                                  
Press Enter or Esc to close console...  

'`powershell' is not recognized as an internal or external command, operable program or batch file.

typing just powershell in conemu results in a fine running powershell(x64) process, so I don't think this is a path issue. im on conemu 64 as well.

2c2c

Posted 2015-07-13T00:59:59.250

Reputation: 187

Answers

3

Looks like there are stray back-tick (`) characters in those instructions. They are used to delimit code blocks in markdown, but so is putting four spaces before the code on a new line. It looks like the author tried to do both.

The fix is to ignore those back ticks at the start and end of those commands.

`powershell -noexit -command Set-ExecutionPolicy bypass;.$env:LocalAppData\GitHub\shell.ps1;.$env:github_posh_git\profile.example.ps1 -new_console:a`

should be:

powershell -noexit -command Set-ExecutionPolicy bypass;.$env:LocalAppData\GitHub\shell.ps1;.$env:github_posh_git\profile.example.ps1 -new_console:a

Windos

Posted 2015-07-13T00:59:59.250

Reputation: 10 080

well I should know better... but so should he :) thanks bud – 2c2c – 2015-07-13T01:11:22.287

Apparently editing that page is open to anyone, so I have removed the back ticks from the documentation to avoid future confusion. – Windos – 2015-07-13T01:12:07.747

apparently, the whole page is deleted? – kumarharsh – 2016-01-07T06:44:42.837

@kumar_harsh looks like it was renamed: https://github.com/rajmenon/KB/wiki/Setup-a-ConEmu-task-for-posh-git--(w--Github-for-windows)

– Windos – 2016-01-08T03:10:11.120

alright, I've updated it in the question – kumarharsh – 2016-01-08T07:43:29.180