美文网首页
windows下IDEA的terminal配置bash命令

windows下IDEA的terminal配置bash命令

作者: jeffrey_hjf | 来源:发表于2021-02-01 17:09 被阅读0次

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

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

image

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

  • .bash_profile
  • .bashrc

例如:【C:\Users\John】

image

文件内容如下:

.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命令

image

相关文章

网友评论

      本文标题:windows下IDEA的terminal配置bash命令

      本文链接:https://www.haomeiwen.com/subject/vtcstltx.html