windows下IDEA的terminal配置bash命令


使用git-bash.exe会单独打开一个窗口,而我们希望是在终端内置的命令行。这里我使用bash.exe

在IDEA中,打开settings,设置相应的bash路径 
settings–>Tools–>Terminal–>Shell path:D:\Program Files\Git\bin\bash.exe

使用sublime在${user}这目录下创建两个文件:

  • .bash_profile
  • .bashrc

例如:【C:\Users\John】

文件内容如下:

.bash_profile

if [ -f ~/.bashrc ]; then . ~/.bashrc; fi

 

.bashrc

alias ls='ls -F --color=auto --show-control-chars' # 使用ls命令的时候加上颜色
export LC_ALL=zh_CN.UTF-8 # 设置终端打开的编码

alias ll='ls -la -F --color=auto --show-control-chars'

 

重启terminal即可使用bash.exe命令


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM