Set .bashrc location in cygwin + conemu without changing $HOME

0

1

I would like to explicitely specify where cygwin reads .bashrc from. from what i can guess, .bash_profile uses $HOME to find where .bashrc however some projects I work on require me to change $HOME. Obviously once I change $HOME I lose access to my .bashrc

I tried setting the path explicitly:

.bashrc

I set $HOME through ConEmu like this:

conemu Home

This is how my cygwin task looks like (its the default config by ConEmu)

set CHERE_INVOKING=1 & %ConEmuDrive%\cygwin64\bin\bash.exe --login -i -new_console:C:"%ConEmuDrive%\cygwin64\Cygwin.ico"

Edqu3

Posted 2016-10-05T19:03:45.710

Reputation: 11

Answers

0

I figured out a workaround.

add

export HOME='C:\path\to\your\custom\home\'

to the end of your .bashrc file.

then in ConEmu startup>environment add

set HOME=\path\to\your\bashrc

Basically you're setting your home directory long enough so bash can read in bashrc and then switching home to your project directory.

Edqu3

Posted 2016-10-05T19:03:45.710

Reputation: 11