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