Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Cmder here" doesn't work if set start-up dir #709

Closed
nguymin4 opened this issue Nov 14, 2015 · 2 comments
Closed

"Cmder here" doesn't work if set start-up dir #709

nguymin4 opened this issue Nov 14, 2015 · 2 comments

Comments

@nguymin4
Copy link

Hi, I have the problem above for several months and I hope someone can help me with that.

OS: Windows 10
Cmder: 1.2.9
Git-for-Windows: 2.6.3

I set up startup dir for a default task with git-bash. However if I set startup dir then I cannot use the context menu Cmder Here anymore.

In addition, if I press Ctrl+T to create new session, then the new session will open the startup directory, not the current working directory.

@nguymin4 nguymin4 changed the title " "Cmder here" doesn't work if set start-up dir Nov 14, 2015
@jankatins
Copy link
Contributor

What does it mean that you "cannot use the context menu" anymore. Does it just start up in the wrong dir?

If it is the latter, it could be this line in init.bat:

@if defined CMDER_START (
    @cd /d "%CMDER_START%"
) else (
    @if "%CD%\" == "%CMDER_ROOT%" (
        @cd /d "%HOME%"
    )
)

If so, it might help to change it to:

@if "%CD%\" == "%CMDER_ROOT%" (
   @if defined CMDER_START (
       @cd /d "%CMDER_START%"
    ) else (
       @cd /d "%HOME%"
    )
)

@nguymin4
Copy link
Author

@JanSchulz : I mean it always start with the startup-dir instead of the current working directory where I use Cmder here or where I press Ctrl+T (to create a new console)

Here is my default task
%CMDER_ROOT%\..\Git\bin\sh.exe --login -i -new_console:d:D:\My_startup_dir
So even I'm in a different directory, Cmder here always open my_startup_dir

Although, I think your solution is not gonna work, I did try it and it turned out I was right :(.
Thanks for you help anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants