teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

追記

2017/08/04 04:42

投稿

roronoazoro
roronoazoro

スコア113

title CHANGED
File without changes
body CHANGED
@@ -2,4 +2,52 @@
2
2
  一応、ターミナルdeha`./bashrc`に記述しております。
3
3
  この設定をどうにか引き継ぎたいのですが、どこのファイルに記述すれば反映するのかわかりません。
4
4
  アドバイスいただけると幸いです。
5
- よろしくお願いします。
5
+ よろしくお願いします。
6
+
7
+ **.bashrc**
8
+ ```bash
9
+ #PS1="\[\033[36m\]\h:\W \u\$\[\033[0m\]"
10
+ #PS1="\w\$\[\033[0m\]"
11
+ #PS1='\[\e[36m\]test-app2 \[\e[33m\]\t \[\e[31m]'
12
+ git_branch(){
13
+ echo $(git branch --no-color 2>/dev/null | sed -ne "s/^\* \(.*\)$/\1/p")
14
+ }
15
+ PS1='\[\033[36m\]\w\[\033[0m\]:\[\033[35m\]$(git_branch)\[\033[0m\]$'
16
+ #PS1='——\n\[\033[36m\]\u\[\033[0m\]\[\033[32m\]\w\[\033[0m\]:\[\033[35m\]$(git_branch)\[\033[0m\] $ '
17
+
18
+ #macportsの設定
19
+ export path=/opt/local/bin:/opt/local/sbin:$path
20
+ export manpath=/opt/local/man:$manpath
21
+ #ターミナルからVisual Studio Code
22
+ code () { vscode_cwd="$pwd" open -n -b "com.microsoft.vscode" --args $* }
23
+
24
+ ```
25
+
26
+ **.bash_profile**
27
+ ```bash
28
+ if [ "$TERM_PROGRAM" = "Apple_Terminal" ]; then
29
+
30
+ if [ -f ~/.bashrc ]; then
31
+ source ~/.bashrc
32
+ fi
33
+ fi
34
+
35
+ if [-f ~/.bashrc];
36
+ then source ~/.bashrc
37
+ fi
38
+
39
+ ##
40
+ # Your previous /Users/username/.bash_profile file was backed up as /Users/username/.bash_profile.macports-saved_2017-07-21_at_13:48:00
41
+ ##
42
+
43
+ # MacPorts Installer addition on 2017-07-21_at_13:48:00: adding an appropriate PATH variable for use with MacPorts.
44
+ export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
45
+ # Finished adapting your PATH environment variable for use with MacPorts.
46
+
47
+ #javaの設定
48
+ export PATH=$PATH:/Library/Java/JavaVirtualMachines/jdk1.8.0_141.jdk/Contents/Home/bin
49
+ export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_141.jdk/Contents/Home
50
+ #mysqlの設定
51
+ #export PATH="/usr/local/mysql/bin:$PATH"
52
+
53
+ ```