質問編集履歴

4

alias削除後のエラーを追記しました。

2019/05/08 02:45

投稿

susiyaki
susiyaki

スコア39

title CHANGED
File without changes
body CHANGED
@@ -272,4 +272,24 @@
272
272
  232
273
273
  233 # sbin
274
274
  234 export PATH="/usr/local/sbin:$PATH"
275
+ ```
276
+
277
+
278
+ alias削除後のエラー
279
+ ```
280
+ Warning: "config" scripts exist outside your system or Homebrew directories.
281
+ `./configure` scripts often look for *-config scripts to determine if
282
+ software packages are installed, and which additional flags to use when
283
+ compiling and linking.
284
+
285
+ Having additional scripts in your path can confuse software installed via
286
+ Homebrew if the config script overrides a system or Homebrew-provided
287
+ script of the same name. We found the following "config" scripts:
288
+ /Users/ryo/.phpbrew/php/php-7.3.3/bin/php-config
289
+ /Users/ryo/.pyenv/shims/python2-config
290
+ /Users/ryo/.pyenv/shims/python3.7-config
291
+ /Users/ryo/.pyenv/shims/python2.7-config
292
+ /Users/ryo/.pyenv/shims/python3.7m-config
293
+ /Users/ryo/.pyenv/shims/python-config
294
+ /Users/ryo/.pyenv/shims/python3-config
275
295
  ```

3

追記ミス修正

2019/05/08 02:45

投稿

susiyaki
susiyaki

スコア39

title CHANGED
File without changes
body CHANGED
@@ -105,5 +105,171 @@
105
105
  65
106
106
  66 zstyle ':vcs_info:*' formats '%F{green}(%s)-[%b]%f'
107
107
  67 zstyle ':vcs_info:*' actionformats '%F{red}(%s)-[%b|%a]%f'
108
+ 68
109
+ 69 function _update_vcs_info_msg() {
110
+ 70 ¦ LANG=en_US.UTF-8 vcs_info
111
+ 71 ¦ RPROMPT="${vcs_info_msg_0_}"
112
+ 72 }
113
+ 73 add-zsh-hook precmd _update_vcs_info_msg
114
+ 74
115
+ 75
116
+ 76 ########################################
117
+ 77 # オプション
118
+ 78 # 日本語ファイル名を表示可能にする
119
+ 79 setopt print_eight_bit
120
+ 80
121
+ 81 # beep を無効にする
122
+ 82 setopt no_beep
123
+ 83
124
+ 84 # フローコントロールを無効にする
125
+ 85 setopt no_flow_control
126
+ 86
127
+ 87 # Ctrl+Dでzshを終了しない
128
+ 88 setopt ignore_eof
129
+ 89
130
+ 90 # '#' 以降をコメントとして扱う
131
+ 91 setopt interactive_comments
132
+ 92
133
+ 93 # ディレクトリ名だけでcdする
134
+ 94 setopt auto_cd
135
+ 95
136
+ 96 # cd したら自動的にpushdする
137
+ 97 setopt auto_pushd
138
+ 98 # 重複したディレクトリを追加しない
139
+ 99 setopt pushd_ignore_dups
140
+ 100
141
+ 101 # 同時に起動したzshの間でヒストリを共有する
142
+ 102 setopt share_history
143
+ 103
144
+ 104 # 同じコマンドをヒストリに残さない
145
+ 105 setopt hist_ignore_all_dups
146
+ 106
147
+ 107 # スペースから始まるコマンド行はヒストリに残さない
148
+ 108 setopt hist_ignore_space
149
+ 109
150
+ 110 # ヒストリに保存するときに余分なスペースを削除する
151
+ 111 setopt hist_reduce_blanks
152
+ 112
153
+ 113 # 高機能なワイルドカード展開を使用する
154
+ 114 setopt extended_glob
155
+ 115
156
+ 116 ########################################
157
+ 117 # キーバインド
158
+ 118
159
+ 119 # ^R で履歴検索をするときに * でワイルドカードを使用出来るようにする
160
+ 120 bindkey '^R' history-incremental-pattern-search-backward
161
+ 121
162
+ 122 ########################################
163
+ 123 # エイリアス
164
+ 124
165
+ 125 alias la='ls -a'
166
+ 126 alias ll='ls -l'
167
+ 127
168
+ 128 alias rm='rm -i'
169
+ 129 alias cp='cp -i'
170
+ 130 alias mv='mv -i'
171
+ 131
172
+ 132 alias mkdir='mkdir -p'
173
+ 133
174
+ 134 # sudo の後のコマンドでエイリアスを有効にする
175
+ 135 alias sudo='sudo '
176
+ 136
177
+ 137 # グローバルエイリアス
178
+ 138 alias -g L='| less'
179
+ 139 alias -g G='| grep'
180
+ 140 alias rmv='rmtrash'
181
+ 141
182
+ 142 # bundle rails
183
+ 143 alias rails='bundle exec rails'
184
+ 144
185
+ 145 # bundle install
186
+ 146 alias binstall='bundle install --path vendor/bundle -j4'
187
+ 147
188
+ 148 # openGL compile
189
+ 149 alias gccgl='gcc -framework GLUT -framework OpenGL'
190
+ 150
191
+ 151 # C で標準出力をクリップボードにコピーする
192
+ 152 # mollifier delta blog : http://mollifier.hatenablog.com/entry/20100317/p1
193
+ 153 if which pbcopy >/dev/null 2>&1 ; then
194
+ 154 ¦ # Mac
195
+ 155 ¦ alias -g C='| pbcopy'
196
+ 156 elif which xsel >/dev/null 2>&1 ; then
197
+ 157 ¦ # Linux
198
+ 158 ¦ alias -g C='| xsel --input --clipboard'
199
+ 159 elif which putclip >/dev/null 2>&1 ; then
200
+ 160 ¦ # Cygwin
201
+ 161 ¦ alias -g C='| putclip'
202
+ 162 fi
203
+ 163
204
+ 164
205
+ 165
206
+ 166 ########################################
207
+ 167 # OS 別の設定
208
+ 168 case ${OSTYPE} in
209
+ 169 ¦ darwin*)
210
+ 170 ¦ ¦ ¦ #Mac用の設定
211
+ 171 ¦ ¦ ¦ export CLICOLOR=1
212
+ 172 ¦ ¦ ¦ alias ls='ls -G -F'
213
+ 173 ¦ ¦ ¦ ;;
214
+ 174 ¦ linux*)
215
+ 175 ¦ ¦ ¦ #Linux用の設定
216
+ 176 ¦ ¦ ¦ alias ls='ls -F --color=auto'
217
+ 177 ¦ ¦ ¦ ;;
218
+ 178 esac
219
+ 179
220
+ 180 #vim:set ft=zsh:
221
+ 181
222
+ 182 # scalaの管理アプリパス
223
+ 183 export PATH="$HOME/.jenv/bin:$PATH"
224
+ 184 eval "$(jenv init -)"
225
+ 185 export PATH="${HOME}/.scalaenv/bin:${PATH}"
226
+ 186 eval "$(scalaenv init -)"
227
+ 187 export PATH="${HOME}/.playenv/bin:${PATH}"
228
+ 188 eval "$(playenv init -)"
229
+ 189 export PATH="${HOME}/.sbtenv/bin:${PATH}"
230
+ 190 eval "$(sbtenv init -)"
231
+ 191 export PATH="/usr/local/opt/mysql@5.7/bin:$PATH"
232
+ 192
233
+ 193 # hyper-tab-icon設定
234
+ 194 # Override auto-title when static titles are desired ($ title My new title)
235
+ 195 title() { export TITLE_OVERRIDDEN=1; echo -en "\e]0;$*\a"}
236
+ 196 # Turn off static titles ($ autotitle)
237
+ 197 autotitle() { export TITLE_OVERRIDDEN=0 }; autotitle
238
+ 198 # Condition checking if title is overridden
239
+ 199 overridden() { [[ $TITLE_OVERRIDDEN == 1 ]]; }
240
+ 200 # Echo asterisk if git state is dirty
241
+ 201 gitDirty() { [[ $(git status 2> /dev/null | grep -o '\w+' | tail -n1) != ("clean"|"") ]] && echo "*" }
242
+ 202
243
+ 203 # Show cwd when shell prompts for input.
244
+ 204 precmd() {
245
+ 205 ¦if overridden; then return; fi
246
+ 206 ¦cwd=${$(pwd)##*/} # Extract current working dir only
247
+ 207 ¦print -Pn "\e]0;$cwd$(gitDirty)\a" # Replace with $pwd to show full path
248
+ 208 }
249
+ 209
250
+ 210 # Prepend command (w/o arguments) to cwd while waiting for command to complete.
251
+ 211 preexec() {
252
+ 212 ¦if overridden; then return; fi
108
- NORMAL .zshrc | + unix | utf-8 | zsh 0% 1:1
253
+ 213 ¦printf "\033]0;%s\a" "${1%% *} | $cwd$(gitDirty)" # Omit construct from $1 to show args
254
+ 214 }
255
+ 215
256
+ 216 # phpbrew
257
+ 217 source $HOME/.phpbrew/bashrc
258
+ 218 export PATH="/usr/local/opt/curl/bin:$PATH"
259
+ 219 export PATH="/usr/local/opt/icu4c/bin:$PATH"
260
+ 220 export PATH="/usr/local/opt/icu4c/sbin:$PATH"
261
+ 221 export PATH="/usr/local/opt/libxml2/bin:$PATH"
262
+ 222 export PATH="/usr/local/opt/openssl/bin:$PATH"
263
+ 223
264
+ 224 # laravel
265
+ 225 export PATH="$PATH:$HOME/.composer/vendor/bin"
266
+ 226
267
+ 227 # aws cli
268
+ 228 export PATH=~/.local/bin:$PATH
269
+ 229
270
+ 230 # yarn
271
+ 231 export PATH="$HOME/.yarn/bin:$PATH"
272
+ 232
273
+ 233 # sbin
274
+ 234 export PATH="/usr/local/sbin:$PATH"
109
275
  ```

2

.zshrcファイル追記

2019/05/08 02:40

投稿

susiyaki
susiyaki

スコア39

title CHANGED
File without changes
body CHANGED
@@ -35,4 +35,75 @@
35
35
  ```
36
36
  % echo $SHELL
37
37
  /usr/local/bin/zsh
38
+ ```
39
+
40
+ ```.zshrc
41
+ 1 # 少し凝った zshrc
42
+ 2 # License : MIT
43
+ 3 # http://mollifier.mit-license.org/
44
+ 4
45
+ 5 ########################################
46
+ 6 # 環境変数
47
+ 7 export LANG=ja_JP.UTF-8
48
+ 8 export PATH="/usr/local/opt/libxml2/bin:$PATH"
49
+ 9
50
+ 10
51
+ 11 # 色を使用出来るようにする
52
+ 12 autoload -Uz colors
53
+ 13 colors
54
+ 14
55
+ 15 # ヒストリの設定
56
+ 16 HISTFILE=~/.zsh_history
57
+ 17 HISTSIZE=1000000
58
+ 18 SAVEHIST=1000000
59
+ 19
60
+ 20 # プロンプト
61
+ 21 # 1行表示
62
+ 22 # PROMPT="%~ %# "
63
+ 23 # 2行表示
64
+ 24 #PROMPT="%{${fg[green]}%}[%n]%{${reset_color}%} %F{red}%~%f
65
+ 25 #%# "
66
+ 26 PROMPT="%(?.%{${fg[green]}%}.%{${fg[magenta]}%})%n${reset_color}${reset_color}(%*%)
67
+ 27 %# "
68
+ 28
69
+ 29 export LSCOLORS=gxfxcxdxbxegedabagacag
70
+ 30 export LS_COLORS='di=36;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;46'
71
+ 31
72
+ 32
73
+ 33 # 単語の区切り文字を指定する
74
+ 34 autoload -Uz select-word-style
75
+ 35 select-word-style default
76
+ 36 # ここで指定した文字は単語区切りとみなされる
77
+ 37 # / も区切りと扱うので、^W でディレクトリ1つ分を削除できる
78
+ 38 zstyle ':zle:*' word-chars " /=;@:{},|"
79
+ 39 zstyle ':zle:*' word-style unspecified
80
+ 40
81
+ 41 ########################################
82
+ 42 # 補完
83
+ 43 # 補完機能を有効にする
84
+ 44 autoload -Uz compinit
85
+ 45 compinit
86
+ 46
87
+ 47 # 補完で小文字でも大文字にマッチさせる
88
+ 48 zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
89
+ 49
90
+ 50 # ../ の後は今いるディレクトリを補完しない
91
+ 51 zstyle ':completion:*' ignore-parents parent pwd ..
92
+ 52
93
+ 53 # sudo の後ろでコマンド名を補完する
94
+ 54 zstyle ':completion:*:sudo:*' command-path /usr/local/sbin /usr/local/bin \
95
+ 55 ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦/usr/sbin /usr/bin /sbin /bin /usr/X11R6/bin
96
+ 56
97
+ 57 # ps コマンドのプロセス名補完
98
+ 58 zstyle ':completion:*:processes' command 'ps x -o pid,s,args'
99
+ 59
100
+ 60
101
+ 61 ########################################
102
+ 62 # vcs_info
103
+ 63 autoload -Uz vcs_info
104
+ 64 autoload -Uz add-zsh-hook
105
+ 65
106
+ 66 zstyle ':vcs_info:*' formats '%F{green}(%s)-[%b]%f'
107
+ 67 zstyle ':vcs_info:*' actionformats '%F{red}(%s)-[%b|%a]%f'
108
+ NORMAL .zshrc | + unix | utf-8 | zsh 0% 1:1
38
109
  ```

1

echo $PATH,$SHELLの結果追記

2019/05/08 02:38

投稿

susiyaki
susiyaki

スコア39

title CHANGED
File without changes
body CHANGED
@@ -24,4 +24,15 @@
24
24
 
25
25
  ### 補足情報(FW/ツールのバージョンなど)
26
26
 
27
- Homebrew 2.1.1
27
+ Homebrew 2.1.1
28
+
29
+ ### echo結果(追記)
30
+
31
+ ```
32
+ % echo $PATH
33
+ /usr/local/sbin:/Users/ryo/.yarn/bin:/Users/ryo/.local/bin:/usr/local/opt/openssl/bin:/usr/local/opt/libxml2/bin:/usr/local/opt/icu4c/sbin:/usr/local/opt/icu4c/bin:/usr/local/opt/curl/bin:/Users/ryo/.phpbrew/php/php-7.3.3/bin:/Users/ryo/.phpbrew/bin:/usr/local/opt/mysql@5.7/bin:/Users/ryo/.sbtenv/shims:/Users/ryo/.sbtenv/bin:/Users/ryo/.playenv/shims:/Users/ryo/.playenv/bin:/Users/ryo/.scalaenv/shims:/Users/ryo/.scalaenv/bin:/Users/ryo/.jenv/shims:/Users/ryo/.jenv/bin:/usr/local/opt/libxml2/bin:/Users/ryo/.pyenv/shims:/Users/ryo/.pyenv/bin:/Users/ryo/.nodebrew/current/bin:/Users/ryo/.rbenv/shims:/Users/ryo/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Xamarin:Workbooks.app/Contents/SharedSupport/path-bin:/Users/ryo/.composer/vendor/bin
34
+ ```
35
+ ```
36
+ % echo $SHELL
37
+ /usr/local/bin/zsh
38
+ ```