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

Feature Request: New Tab Directory & Environment Inheritance #724

Open
DeadParrot opened this Issue Jun 12, 2016 · 9 comments

Comments

Projects
None yet
2 participants
@DeadParrot

DeadParrot commented Jun 12, 2016

Versions

ConEmu build: 160609 x32
OS version: Windows 10 x64
Used shell version: cmd

Problem description

ConEmu is awesome but it would be very useful to have a working mechanism to open a new tab in the same directory as the current (active) tab with or without inheriting the environment.

The Shell macro command with new_console appears from the (minimal) documentation to support this but in practice it isn't working.

  • Shell("new_console:i:d:%CD%") opens in the directory of the first, not the active tab and inherits the environment even though it shouldn't but only in the first new tab: opening additional tabs from that do not inherit the environment.
  • Shell("new_console:i:I") inherits the environment but, like the above, only for the first tab, and only the first tab opens in the same directory
@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Jun 12, 2016

Owner

Really? Why do you think, that without injects ConEmu would provide extended features???

Owner

Maximus5 commented Jun 12, 2016

Really? Why do you think, that without injects ConEmu would provide extended features???

@DeadParrot

This comment has been minimized.

Show comment
Hide comment
@DeadParrot

DeadParrot Jun 12, 2016

Sorry for the confusion. I added :i in an attempt to fix other problems without it:

  • The ConEmu path additions get added again for every new tab (at least under Cmder)
  • Shell("new_console:d:%CD%") inherits the environment when I don't want it to

If these issues can be fixed then my goals can be met. But currently I can't find a way to meet them.

DeadParrot commented Jun 12, 2016

Sorry for the confusion. I added :i in an attempt to fix other problems without it:

  • The ConEmu path additions get added again for every new tab (at least under Cmder)
  • Shell("new_console:d:%CD%") inherits the environment when I don't want it to

If these issues can be fixed then my goals can be met. But currently I can't find a way to meet them.

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Jun 12, 2016

Owner

Why do you even use shell GuiMacro? I doubt you what to start different shells.

Owner

Maximus5 commented Jun 12, 2016

Why do you even use shell GuiMacro? I doubt you what to start different shells.

@DeadParrot

This comment has been minimized.

Show comment
Hide comment
@DeadParrot

DeadParrot Jun 12, 2016

No, you are right. I just want to start the same shell, usually just cmd. Is there another way to accomplish what I want with a macro?

DeadParrot commented Jun 12, 2016

No, you are right. I just want to start the same shell, usually just cmd. Is there another way to accomplish what I want with a macro?

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Jun 12, 2016

Owner

shell("new_console") is expected to be executed in the console (tab), which implies environment inheritance.
Why just do not use hotkey for your task?

Owner

Maximus5 commented Jun 12, 2016

shell("new_console") is expected to be executed in the console (tab), which implies environment inheritance.
Why just do not use hotkey for your task?

@DeadParrot

This comment has been minimized.

Show comment
Hide comment
@DeadParrot

DeadParrot Jun 12, 2016

But in the first case I want directory inheritance without environment inheritance. Is there a way to do that?

And is there a way to avoid the PATH getting duplicate ConEmu additions for every new_console operation?

DeadParrot commented Jun 12, 2016

But in the first case I want directory inheritance without environment inheritance. Is there a way to do that?

And is there a way to avoid the PATH getting duplicate ConEmu additions for every new_console operation?

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Jun 12, 2016

Owner

But in the first case I want directory inheritance without environment inheritance.

As I've said: just do use hotkey for your task

And is there a way to avoid the PATH getting duplicate ConEmu additions for every new_console operation?

I'll check it. Actually, it's a subject for real issue...

Owner

Maximus5 commented Jun 12, 2016

But in the first case I want directory inheritance without environment inheritance.

As I've said: just do use hotkey for your task

And is there a way to avoid the PATH getting duplicate ConEmu additions for every new_console operation?

I'll check it. Actually, it's a subject for real issue...

@DeadParrot

This comment has been minimized.

Show comment
Hide comment
@DeadParrot

DeadParrot Jun 12, 2016

But in the first case I want directory inheritance without environment inheritance.

As I've said: just do use hotkey for your task

So I tried just a hotkey on "Create new cmd.exe console" and seems good so I assume this is what you meant. The only oddity is that it adds the network login before the directory. Is there a way to control the prompt for a cmd.exe? Update: Found http://conemu.github.io/en/CmdPrompt.html

And is there a way to avoid the PATH getting duplicate ConEmu additions for every new_console operation?

I'll check it. Actually, it's a subject for real issue...

Great.

DeadParrot commented Jun 12, 2016

But in the first case I want directory inheritance without environment inheritance.

As I've said: just do use hotkey for your task

So I tried just a hotkey on "Create new cmd.exe console" and seems good so I assume this is what you meant. The only oddity is that it adds the network login before the directory. Is there a way to control the prompt for a cmd.exe? Update: Found http://conemu.github.io/en/CmdPrompt.html

And is there a way to avoid the PATH getting duplicate ConEmu additions for every new_console operation?

I'll check it. Actually, it's a subject for real issue...

Great.

@Maximus5

This comment has been minimized.

Show comment
Hide comment
@Maximus5

Maximus5 Jun 13, 2016

Owner

Just do use hotkey for your task. I mean exactly what I've said.

2016-06-13_11-08-26

Owner

Maximus5 commented Jun 13, 2016

Just do use hotkey for your task. I mean exactly what I've said.

2016-06-13_11-08-26

Maximus5 added a commit that referenced this issue Jun 14, 2016

Don't process (append) environment variable twice (ref gh-724).
  Example: `PATH=%ConEmuBaseDir%\Scripts;%PATH%;C:\Tools\Arc`
  So, do not add `%ConEmuBaseDir%\Scripts;` and `;C:\Tools\Arc`
  if they already exist in PATH. Only explicit comparison is done,
  so, if `C:\Tools\Arc` is in the middle of current `%PATH%`,
  it would be processed (appended).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment