V
V
Vitaly Melnikov2019-09-29 13:13:38
bash
Vitaly Melnikov, 2019-09-29 13:13:38

How to separate GITBash and CMDER settings?

In CMDER (ConEmu) I have a GIT console connected.
cmd /c ""%ConEmuDir%\..\git-for-windows\bin\bash" --login -i" -new_console:d:C:\Projects
I use the same console in PHPStorm
Basic settings in .bashrc
But for convenience when I work in CMDER I want the bash tab to be opened by Ctrl + T without questions.
And also so that the same folder opens in a new tab as in the current tab.
I achieve this if I write in .bashrc:
export PROMPT_COMMAND='ConEmuC -StoreCWD; history -a'
But then there is an error when opening the console in PHPStorm.
Tried to put in StartUp Environments
export PROMPT_COMMAND='ConEmuC -StoreCWD; history -a'
Didn't help.
How can this setting be highlighted only when running the CMDER console?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey c0re, 2019-10-03
@Vmelnikoff

or determine the launch environment by some environment variable, if any.
either independently in CMDER (or vice versa in PHPStorm) if there is such an opportunity - before starting bash, set the environment variable.
and in .bashrc check this variable by the if condition and if there is a variable, then perform settings for CMDER, if not, then for PHPStorm
something like this...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question