質問編集履歴

1

~/.bash_profileと~/.bashrcを追記

2019/11/12 00:43

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -51,3 +51,273 @@
51
51
  ![イメージ説明](bd9195b6801d9c5bde55177a9dc370d9.png)
52
52
 
53
53
  白色に代わったこと。
54
+
55
+
56
+
57
+ ## 追記
58
+
59
+ ~/.bash_profileは作っていないです。
60
+
61
+ ~/.bashrcは下記のとおりです。
62
+
63
+ これらのファイルは問題が起こった際に編集などを行っていないです。
64
+
65
+ ```ここに言語を入力
66
+
67
+ vagrant@vagrant:~$ cat ~/.bash_profile
68
+
69
+ vagrant@vagrant:~$ cat ~/.bashrc
70
+
71
+ # ~/.bashrc: executed by bash(1) for non-login shells.
72
+
73
+ # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
74
+
75
+ # for examples
76
+
77
+
78
+
79
+ # If not running interactively, don't do anything
80
+
81
+ case $- in
82
+
83
+ *i*) ;;
84
+
85
+ *) return;;
86
+
87
+ esac
88
+
89
+
90
+
91
+ # don't put duplicate lines or lines starting with space in the history.
92
+
93
+ # See bash(1) for more options
94
+
95
+ HISTCONTROL=ignoreboth
96
+
97
+
98
+
99
+ # append to the history file, don't overwrite it
100
+
101
+ shopt -s histappend
102
+
103
+
104
+
105
+ # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
106
+
107
+ HISTSIZE=1000
108
+
109
+ HISTFILESIZE=2000
110
+
111
+
112
+
113
+ # check the window size after each command and, if necessary,
114
+
115
+ # update the values of LINES and COLUMNS.
116
+
117
+ shopt -s checkwinsize
118
+
119
+
120
+
121
+ # If set, the pattern "**" used in a pathname expansion context will
122
+
123
+ # match all files and zero or more directories and subdirectories.
124
+
125
+ #shopt -s globstar
126
+
127
+
128
+
129
+ # make less more friendly for non-text input files, see lesspipe(1)
130
+
131
+ [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
132
+
133
+
134
+
135
+ # set variable identifying the chroot you work in (used in the prompt below)
136
+
137
+ if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
138
+
139
+ debian_chroot=$(cat /etc/debian_chroot)
140
+
141
+ fi
142
+
143
+
144
+
145
+ # set a fancy prompt (non-color, unless we know we "want" color)
146
+
147
+ case "$TERM" in
148
+
149
+ xterm-color|*-256color) color_prompt=yes;;
150
+
151
+ esac
152
+
153
+
154
+
155
+ # uncomment for a colored prompt, if the terminal has the capability; turned
156
+
157
+ # off by default to not distract the user: the focus in a terminal window
158
+
159
+ # should be on the output of commands, not on the prompt
160
+
161
+ #force_color_prompt=yes
162
+
163
+
164
+
165
+ if [ -n "$force_color_prompt" ]; then
166
+
167
+ if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
168
+
169
+ # We have color support; assume it's compliant with Ecma-48
170
+
171
+ # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
172
+
173
+ # a case would tend to support setf rather than setaf.)
174
+
175
+ color_prompt=yes
176
+
177
+ else
178
+
179
+ color_prompt=
180
+
181
+ fi
182
+
183
+ fi
184
+
185
+
186
+
187
+ if [ "$color_prompt" = yes ]; then
188
+
189
+ PS1='${debian_chroot:+($debian_chroot)}[\033[01;32m]\u@\h[\033[00m]:[\033[01;34m]\w[\033[00m]$ '
190
+
191
+ else
192
+
193
+ PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$ '
194
+
195
+ fi
196
+
197
+ unset color_prompt force_color_prompt
198
+
199
+
200
+
201
+ # If this is an xterm set the title to user@host:dir
202
+
203
+ case "$TERM" in
204
+
205
+ xterm*|rxvt*)
206
+
207
+ PS1="[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a]$PS1"
208
+
209
+ ;;
210
+
211
+ *)
212
+
213
+ ;;
214
+
215
+ esac
216
+
217
+
218
+
219
+ # enable color support of ls and also add handy aliases
220
+
221
+ if [ -x /usr/bin/dircolors ]; then
222
+
223
+ test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
224
+
225
+ alias ls='ls --color=auto'
226
+
227
+ #alias dir='dir --color=auto'
228
+
229
+ #alias vdir='vdir --color=auto'
230
+
231
+
232
+
233
+ alias grep='grep --color=auto'
234
+
235
+ alias fgrep='fgrep --color=auto'
236
+
237
+ alias egrep='egrep --color=auto'
238
+
239
+ fi
240
+
241
+
242
+
243
+ # colored GCC warnings and errors
244
+
245
+ #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
246
+
247
+
248
+
249
+ # some more ls aliases
250
+
251
+ alias ll='ls -alF'
252
+
253
+ alias la='ls -A'
254
+
255
+ alias l='ls -CF'
256
+
257
+
258
+
259
+ # Add an "alert" alias for long running commands. Use like so:
260
+
261
+ # sleep 10; alert
262
+
263
+ alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]+\s*//;s/[;&|]\s*alert$//'\'')"'
264
+
265
+
266
+
267
+ # Alias definitions.
268
+
269
+ # You may want to put all your additions into a separate file like
270
+
271
+ # ~/.bash_aliases, instead of adding them here directly.
272
+
273
+ # See /usr/share/doc/bash-doc/examples in the bash-doc package.
274
+
275
+
276
+
277
+ if [ -f ~/.bash_aliases ]; then
278
+
279
+ . ~/.bash_aliases
280
+
281
+ fi
282
+
283
+
284
+
285
+ # enable programmable completion features (you don't need to enable
286
+
287
+ # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
288
+
289
+ # sources /etc/bash.bashrc).
290
+
291
+ if ! shopt -oq posix; then
292
+
293
+ if [ -f /usr/share/bash-completion/bash_completion ]; then
294
+
295
+ . /usr/share/bash-completion/bash_completion
296
+
297
+ elif [ -f /etc/bash_completion ]; then
298
+
299
+ . /etc/bash_completion
300
+
301
+ fi
302
+
303
+ fi
304
+
305
+
306
+
307
+ export PATH="$HOME/.rbenv/bin:$PATH"
308
+
309
+ eval "$(rbenv init -)"
310
+
311
+ export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"
312
+
313
+
314
+
315
+ alias rails='bundle exec rails'
316
+
317
+ alias brs='bundle exec rails s -b 0.0.0.0'
318
+
319
+ alias brc='bundle exec rails c'
320
+
321
+ alias rake='bundle exec rake'
322
+
323
+ ```