'cmder terminal integration into IntelliJ / WebStorm / GoLand with aliases
I would like to use the cmder shell inside IntelliJ / GoLand / WebStorm and so on.
Additionally, I want to use bash instead of the default cmd.
This can be achieved by changing the settings at Settings > Tools > Terminal:
For the Shell path, configure
cmd.exe /c "path\to\my\cmder\vendor\git-for-windows\bin\bash.exe"
This works as expected: When opening a terminal window, cmder starts bash.
However, there is one issue with this: aliases are not working.
In a normal cmder bash-window, I can use aliases like ll. Here, I can't.
I found the aliases to be defined in cmder\vendor\git-for-windows\etc\profile.d\aliases.sh
Edit: When I use the following shell path:
cmd.exe /c "path\to\my\cmder\vendor\git-for-windows\bin\bash.exe" --login -i
... the alias works. But when opening the console, I always get the following error message:
Creating user startup file: /config/user_profile.sh
cp: cannot stat '/vendor/user_profile.sh.default': No such file or directory
Changing the "Start directory" to the cmder folder does not solve the issue.
How can I get them running inside my IDE?
Solution 1:[1]
Steps
1. create environment variable under Advanced System Settings, System Properties, Environment Variables, System Variables with name-value: CMDER_ROOT=C:\path\to\your\cmder
2. create cmder_shell.bat file in cmder folder u mentioned in step 1. with content: '@cmd.exe /k %0..\vendor\init.bat'
3. in shell path write: cmd.exe /c ""%CMDER_ROOT%\cmder_shell.bat
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ivan Jurinjak |
