-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
109 lines (87 loc) · 2.84 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
# -*- shell-script -*-
[[ ! -z $DEBUG ]] && echo "sourcing .bashrc"
[[ -z "$PS1" ]] && return
set -a
# *****************
# * *
# * SHELL OPTIONS *
# * (other) *
# * *
# *****************
# extdebug option causes error in Spacemacs - bash: _Dbg_filenames[$fullname]: bad array subscript
#shopt -q -s extdebug
shopt -q -s dotglob
shopt -q -s extglob
shopt -q -s globstar
# -------------------------------------------
# result of glob expansion matching no files:
# -------------------------------------------
# shopt -q -s failglob # error
shopt -q -s nullglob # null string
# --------
# HISTORY.
# --------
HISTCONTROL=ignorespace:ignoredups:erasedups
HISTFILESIZE=100000
HISTSIZE=100000
PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
# history-refresh function (in ~/.sh-functions): refreshes history (brings
# in commands that have been typed in other shells since the shell started)
shopt -q -s cmdhist
shopt -q -s histappend
shopt -q -s histreedit
shopt -q -s histverify
shopt -q -s lithist
# ********
# * *
# * MISC *
# * *
# ********
# ---enable color support of ls---
# if [ -x /usr/bin/dircolors ]; then test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" fi
# ---ULIMIT---
#ulimit -c unlimited
# --------
# bindings
# --------
bind -x '"\C-x\C-m": "xmodmap $HOME/.Xmodmap"'
# -------------
# vi bindings
# -------------
# bindkey -v
# bindkey -M viins 'jj' vi-cmd-mode
# bindkey '^R' history-incremental-search-backward
# ********************
# * *
# * LOAD OTHER FILES *
# * *
# ********************
# environment: sourcing from .sh-profile doesn't seem to be sufficient, so load in .bashrc
[[ -f ~/.sh-env ]] && source ~/.sh-env
# common startup files
[[ -f ~/.shrc ]] && source ~/.shrc fi # .shrc sources .sh-aliases, .sh-functions
# aliases
[[ -f ~/.bash-aliases ]] && source ~/.bash-aliases
# functions
[[ -f ~/.bash-functions ]] && source ~/.bash-functions
# prompt
[[ -f ~/.bash-prompt ]] && source ~/.bash-prompt
# completion
[[ -f /etc/profile.d/bash_completion.sh ]] && source /etc/profile.d/bash_completion.sh
# misc
[[ -n "$LOAD_SCRATCH" ]] && [[ -f ~/.bash-scratch ]] && source ~/.bash-scratch
# ---bashmarks---
# source .bashmarks-setup.sh after .sh-functions
[[ -f ~/.bashmarks-setup.sh ]] && source ~/.bashmarks-setup.sh
# # ********************
# # * *
# # * EXPORT FUNCTIONS *
# # * *
# # ********************
# for fn in `declare -F | tr -s ' ' | cut -d' ' -f3 | grep '^[^_]'`; do
# export -f $fn >/dev/null
# done
# ----------------------------------------------------------------------------
set +a
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
[ -f ~/.fzf.bash ] && source ~/.fzf.bash