When I using tmux, it always opened new pane at $HOME ,
With the help of nicm , I found the problem is by default /etc/profile
https://github.com/tmux/tmux/issues/1225#issuecomment-357892584
But I don't understand which line cause the problem . I think it can be counted as a bug, because it would affect other software without an explicit notification.
Without seeing the content of your
/etc/profile, I couldn't possibly comment on likely cause. However, I observe that you appear to be usingMSYS2rather thanMSYS. The former is an unofficial fork, which we neither sanction nor support.I'll assign this to our official
MSYSmaintainer for comment, but since you do appear to be using an unsupported fork, it is likely that he will simply close this as "invalid", (i.e. "not our problem").