-
Notifications
You must be signed in to change notification settings - Fork 2
/
.bashrc
53 lines (44 loc) · 1.25 KB
/
.bashrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# .bashrc
# janus_wel <janus.wel.3@gmail.com>
# if not running interactively, don't do anything
if [ -z "$PS1" ]; then
return
fi
# don't put lines that is duplicated and starts with spaces in the history
export HISTCONTROL=ignoreboth
# check the window size after each command and, if necessary, update the values
# of LINES and COLUMNS.
shopt -s checkwinsize
if [ "Darwin" = "$(uname)" ]; then
. /Library/Developer/CommandLineTools/usr/share/git-core/git-prompt.sh
. /Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash
fi
# prompt
case "$TERM" in
screen|xterm-256color)
PS1='\[\033]0;\w$(__git_ps1)\007\]\[\033[1;36m\][\w$(__git_ps1)]\n\[\033[1;32m\]\u@\h\[\033[00m\]$ '
;;
cygwin)
PS1='\[\033]0;\w$(__git_ps1)\007\]\[\033[1;32m\]\u@\h\[\033[00m\]$ '
;;
*)
PS1='\[\033]0;\w\007\]\[\033[1;32m\]\u@\h\[\033[00m\]$ '
;;
esac
# completions
if [ -f /etc/bash_completion ]; then
# shellcheck source=/dev/null
. /etc/bash_completion
fi
# aliases
if [ -f "$HOME"/.bash_aliases ]; then
. "$HOME"/.bash_aliases
fi
# colors
DIRCOLORS_SETTINGS=".dir_colors"
if [ "$TERM" != "dumb" ]; then
if [ -r $DIRCOLORS_SETTINGS ]; then
eval "$(dircolors $DIRCOLORS_SETTINGS -b)"
fi
fi
. "$HOME/.cargo/env"