How do I launch/use Cygwin as the shell for TortoiseHg?

1

0

In the settings for TortoiseHg, there is an option to select what shell you would like to use. The two defaults listed are, as you might expect, "windows_command_prompt" and "powershell" but I would like to use Cygwin. From the documentation: http://tortoisehg.readthedocs.org/en/latest/settings.html#tortoisehg There is some help text...

Specify the command to launch your preferred terminal shell application. If the value includes the string %(reponame)s, the name of the repository will be substituted in place of %(reponame)s. (restart needed)

Default, Windows: cmd.exe /K title %(reponame)s

Default, OS X: not set

Default, other: xterm -T "%(reponame)s"

I know I can launch Cygwin normally from windows just like the shortcut does...

C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico -

And I figure I can add on extra options to adjust the title...

C:\cygwin64\bin\mintty.exe -T "%(reponame)s" -i /Cygwin-Terminal.ico -

but when I set that as the shell, I get an error saying that TortiseHg is unable to start that command.

I can reduce the command to just...

C:\cygwin64\bin\mintty.exe

and it still doesn't work.

Is TortoiseHg adding on commands meant for Windows-style shells which wouldn't be compatible with Cygwin?

Is there a way to make Cygwin my shell for TortoiseHg?

AndrewOnFire

Posted 2016-04-22T17:20:45.120

Reputation: 21

Answers

1

All that is needed in the "Shell" options line is mintty

I installed chere, which seems to have made a difference https://stackoverflow.com/questions/9637601/open-cygwin-at-a-specific-folder

I like putting the icon back, so it grows to mintty -i /Cygwin-Terminal.ico

The title can be changed by adding back in the -T option (to the repo name "%(reponame)s" or the full path "%(root)s").

I also had a cd command in my .bashrc file, so I had to get rid of that. (it would force the directory change every time bash was opened)

AndrewOnFire

Posted 2016-04-22T17:20:45.120

Reputation: 21