使用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命令

网友评论