タイトルの通りですが、visual studio codeの統合ターミナルのユーザーネームなどを色分けする方法を知りたいです。
一応、ターミナルdeha./bashrc
に記述しております。
この設定をどうにか引き継ぎたいのですが、どこのファイルに記述すれば反映するのかわかりません。
アドバイスいただけると幸いです。
よろしくお願いします。
.bashrc
bash
1#PS1="\[\033[36m\]\h:\W \u\$\[\033[0m\]" 2#PS1="\w\$\[\033[0m\]" 3#PS1='\[\e[36m\]test-app2 \[\e[33m\]\t \[\e[31m]' 4git_branch(){ 5 echo $(git branch --no-color 2>/dev/null | sed -ne "s/^\* \(.*\)$/\1/p") 6} 7PS1='\[\033[36m\]\w\[\033[0m\]:\[\033[35m\]$(git_branch)\[\033[0m\]$' 8#PS1='——\n\[\033[36m\]\u\[\033[0m\]\[\033[32m\]\w\[\033[0m\]:\[\033[35m\]$(git_branch)\[\033[0m\] $ ' 9 10#macportsの設定 11export path=/opt/local/bin:/opt/local/sbin:$path 12export manpath=/opt/local/man:$manpath 13#ターミナルからVisual Studio Code 14code () { vscode_cwd="$pwd" open -n -b "com.microsoft.vscode" --args $* } 15
.bash_profile
bash
1if [ "$TERM_PROGRAM" = "Apple_Terminal" ]; then 2 3 if [ -f ~/.bashrc ]; then 4 source ~/.bashrc 5 fi 6fi 7 8if [-f ~/.bashrc]; 9 then source ~/.bashrc 10fi 11 12## 13# Your previous /Users/username/.bash_profile file was backed up as /Users/username/.bash_profile.macports-saved_2017-07-21_at_13:48:00 14## 15 16# MacPorts Installer addition on 2017-07-21_at_13:48:00: adding an appropriate PATH variable for use with MacPorts. 17export PATH="/opt/local/bin:/opt/local/sbin:$PATH" 18# Finished adapting your PATH environment variable for use with MacPorts. 19 20#javaの設定 21export PATH=$PATH:/Library/Java/JavaVirtualMachines/jdk1.8.0_141.jdk/Contents/Home/bin 22export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_141.jdk/Contents/Home 23#mysqlの設定 24#export PATH="/usr/local/mysql/bin:$PATH" 25
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/08/03 12:18
2017/08/03 13:42
2017/08/04 04:45
2017/08/04 10:18 編集