When I open the WSL by clicking on its icon I need it to be opened in a certain directory (of course one that is more useful than
System32), so I add a
cd destination in my
.bashrc. But then the "Open Linux Shell Here" option (available when you hold the Shift key on keyboard and right-click on any folder is also being redirected to that destination, which is undesirable. Is there a way I can detect this case in my
.bashrc script and let it behave as it should?
In short, I need to know when the shell has been opened by the option in Shift+Right Click inside a folder, so that I can avoid changing the working directory to another one.
WSL-Ubuntu 18.04 LTS and
GNU bash, version 4.4.19(1)-release (x86_64-pc-linux-gnu).