-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbashrc
executable file
·65 lines (59 loc) · 1.63 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
54
55
56
57
58
59
60
61
62
63
64
65
export PS1="[\u@\h \w]$ "
if which vim &> /dev/null; then
export EDITOR=vim
fi
umask 0002
if [ -d "$HOME/bin" ]; then
PATH="$HOME/bin:$PATH"
fi
if [ -d "$HOME/.cargo/bin" ]; then
PATH="$HOME/.cargo/bin:$PATH"
fi
if [ -d "/usr/local/go/bin" ]; then
PATH=$PATH:/usr/local/go/bin
fi
if [ -d "$HOME/go/bin" ]; then
PATH="$HOME/go/bin:$PATH"
fi
# aliases
exa --version > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
alias ll="exa -lag -B --time-style long-iso --sort type --git"
else
alias ll='ls -la --group-directories-first --color=auto'
fi
alias crontab='crontab -i'
alias greps='grep -srni --color'
icdiff --version > /dev/null 2>&1
if [ "$?" -eq "0" ]; then
alias gicl='git difftool -y --extcmd icdiff --color=always | less -R'
fi
if which vim &> /dev/null; then
alias vga='vim -c "GV --all"'
fi
if which tmux &> /dev/null; then
alias tmux='TERM=screen-256color-bce tmux'
fi
# start ssh-agent if it's not already running
if [ ! "`ps ax | grep ssh-agent | grep -ivE \"(grep|defunct)\"`" ]; then
eval $(ssh-agent) > /dev/null 2>&1
fi
# include script to find running ssh-agent
if [ -f "$HOME/ssh-find-agent.sh" ]; then
source "$HOME/ssh-find-agent.sh"
set_ssh_agent_socket
fi
# close ssh-agent if it had been started in the current session
trap 'test -n "$SSH_AGENT_PID" && eval `/usr/bin/ssh-agent -k`' 0
if [ -f "$HOME/.git-completion.bash" ]; then
source $HOME/.git-completion.bash
fi
if [ -f /etc/bash_completion ]; then
source /etc/bash_completion
fi
if [ -f "$HOME/.bashrc.custom" ]; then
source $HOME/.bashrc.custom
fi
if [ -f "$HOME/.custom_aliases.sh" ]; then
source "$HOME/.custom_aliases.sh"
fi