-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
112 lines (88 loc) · 2.72 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# PATH
export PATH=$PATH:~/bin
export XDG_CONFIG_HOME=~/.config
# Colors
if [[ $TERM = *-256color ]]; then
export TERM="screen-256color"
fi
# Default editor
#[ -z ${DISPLAY+x} ] && EDITOR=$(type -p vim vi nano | tail -n +1 | head -n 1) || EDITOR=$(type -p subl sublime_text subl3 vim vi nano | tail -n +1 | head -n 1)
#export VISUAL="$(type -p subl sublime_text subl3 | tail -n +1 | head -n 1) -w"
export EDITOR=$(type -p vim vi nano | tail -n +1 | head -n 1)
export GIT_EDITOR=$EDITOR
export VISUAL=$EDITOR
if [ -z "$SSH_CONNECTION" ];
then
# Start keychain ad set SSH_AGENT variable(s)
# if [ ! -S ~/.ssh/ssh-agent.sock ]; then
export SSH_AUTH_SOCK=/tmp/ssh-agent.sock
ssh-agent -a $SSH_AUTH_SOCK &>/dev/null;
# fi
# source <(keychain --confhost --eval );
# eval $(ssh-agent -s -a ~/.ssh/ssh-agent.sock) 2>&1 &>/dev/null;
# Close unused terminal windows after N seconds
#if [ -z ${TMUX+x} ];
#then
# export TMOUT=1200
#else
# export TMOUT=''
#fi
else
# If tmux binary is present -> start or attach to tmux
if type tmux >/dev/null;
then
if [ -z ${TMUX+x} ];
then
tmux attach -d || tmux new
fi
fi
fi
# History
#
# Populate history file if missing
if [ ! -f $HISTFILE ]; then
echo history >> $HISTFILE
chmod 600 $HISTFILE
fi
shopt -s histappend
# shopt -s cmdhist # one command per line
shopt -s autocd
shopt -s cdspell
shopt -s checkjobs
shopt -s checkwinsize
shopt -s dirspell
HISTFILESIZE=16777216
HISTSIZE=16777216
HISTCONTROL=ignoreboth
HISTIGNORE='ls:l:la:bg:fg:g --reset:git --reset:'
# PROMPT_COMMAND='history -a'
# PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"
PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"
# CVS
# export CVS_RSH=ssh
# export CVSROOT=':ext:${LOGNAME}@$(hostname -f):/tmp/cvs'
# If Skype doing bad thinds:
export PULSE_LATENCY_MSEC=60
# Gpodder default data dir
#export GPODDER_DOWNLOAD_DIR='/data/globalundo/Podcasts'
# Provided via dotfiles
[[ -f ~/.bash_aliases ]] && . ~/.bash_aliases
# Autogenerated
[[ -f /etc/bash_completion ]] && . /etc/bash_completion
[[ -f ~/.bash_completion ]] && . ~/.bash_completion
# Applies only to the local environment
[[ -f ~/.bash_custom ]] && . ~/.bash_custom
# PS1 and stuff
. ~/liquidprompt/liquidprompt
builtin true
export PATH="$HOME/.rbenv/bin:$PATH"
#eval "$(rbenv init -)"
export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"
export FZF_COMPLETION_TRIGGER='``'
export FZF_COMPLETION_OPTS='--reverse -m --color=dark'
# export FZF_TMUX_HEIGHT='60%'
[ -f ~/.fzf.bash ] && source ~/.fzf.bash