0

I'm currently using the following to open a Git bash instance:

-new_console:"%ProgramFiles%\Git\bin\sh.exe" --login -i

This starts a new tab in the home directory.

I'd like it to start the tab in whatever directory my current tab is in.

Something like the following:

-new_console:d:[%CURRENT_DIR%]"%ProgramFiles%\Git\bin\sh.exe" --login -i

So if I'm currently in:

> ~/Somedir/SomeOtherDir/

Then I open a tab (perhaps with a macro), I'd like the new tab to start in:

> ~/Somedir/SomeOtherDir/ (i.e., the same directory)

In other words, what command would I place in the following dialog in order to open a new tab which starts in the directory of my current tab? (The command below opens a new tab in the home directory)

I'm still new to ConEmu (but really enjoying the tabs and customization), so any help would be much appreciated.

3
  • So, what exactly do you want? What do you have, what do you want to do, what do you want to get?
    – Maximus
    May 1, 2014 at 22:16
  • You are wrong trying to put your shell path in the "-new_console" switch. Executable must be specified separately of course!
    – Maximus
    May 1, 2014 at 22:20
  • I'd like to open a new tab which starts in the directory of the tab I've opened from. I'll clarify the above. Could elaborate on the wrongness though?
    – funseiki
    May 1, 2014 at 22:42

1 Answer 1

1

You may run the following in your gitbash prompt

ConEmuC -c -new_console sh.exe -l -i

But that requires both ConEmuC.exe and sh.exe are available via %PATH%.

And, please note, that the your first command is useless. It can be working only by lucky chance.

-new_console:"%ProgramFiles%\Git\bin\sh.exe" --login -i

The -new_console does not get shell path (root executable) as argument, it is intended only for specifying special parameters for new ConEmu's console creation.

2
  • This works in the prompt - is there a way to get this to work as a predefined task? I'd like to have this set as a macro. Copying the above into the pre-defined tasks dialog doesn't appear to work (the new tab opens in the home directory)
    – funseiki
    May 2, 2014 at 17:19
  • Of course, that must not be working in tasks! They are executed in the ConEmu scope! If you need to run this with macro, why not to use macro? There is print GuiMacro function.
    – Maximus
    May 3, 2014 at 2:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .