Search code examples
mercurialhgrc

Getting ~ to expand in .hgrc on Windows


Is it possible to get the following to work?

[ui]
ssh = ~\bin\ssh -i ~\.ssh\my_key

Using the Googles implies it must work for some people (Linux users?), but it's definitely not working for me.

I'd also accept $HOME (or some variant), but I can't find the right syntax.


Solution

  • what if you replace ~ with %USERPROFILE% (which, I believe is the equivalent to $HOME in Windows)?