-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig
141 lines (126 loc) · 3.51 KB
/
config
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
###########
# general #
###########
EDITOR=emacs
VISUAL=emacs
PAGER='less -i'
set -o notify # Report status of terminated bg jobs immediately
set -o emacs # emacs-style editing
export GREP_OPTIONS='--color=auto'
"\M-l": "ls -ltrF\r"
"\M-h": "dirs -v\r"
# Use Alt/Meta + Delete to delete the preceding word
"\e[3;3~": kill-word
# If you type any text and press Up/Down,
# you can search your history for commands starting
# with that text
"\e[B": history-search-forward
"\e[A": history-search-backward
###########
# options #
###########
shopt -s nocaseglob
shopt -s extglob # extended pattern matching features
shopt -s cdspell # correct dir spelling errors on cd
shopt -s lithist # save multi-line commands with newlines
shopt -s autocd # if a command is a dir name, cd to it
shopt -s checkjobs # print warning if jobs are running on shell exit
shopt -s dirspell # correct dir spelling errors on completion
shopt -s globstar # ** matches all files, dirs and subdirs
shopt -s cmdhist # save multi-line commands in a single hist entry
shopt -s checkwinsize # check the window size after each command
shopt -s no_empty_cmd_completion # don't try to complete empty cmds
set completion-ignore-case On
##########
# colors #
##########
# define colors
C_DEFAULT="\[\033[m\]"
C_WHITE="\[\033[1m\]"
C_BLACK="\[\033[30m\]"
C_RED="\[\033[31m\]"
C_GREEN="\[\033[32m\]"
C_YELLOW="\[\033[33m\]"
C_BLUE="\[\033[34m\]"
C_PURPLE="\[\033[35m\]"
C_CYAN="\[\033[36m\]"
C_LIGHTGRAY="\[\033[37m\]"
C_DARKGRAY="\[\033[1;30m\]"
C_LIGHTRED="\[\033[1;31m\]"
C_LIGHTGREEN="\[\033[1;32m\]"
C_LIGHTYELLOW="\[\033[1;33m\]"
C_LIGHTBLUE="\[\033[1;34m\]"
C_LIGHTPURPLE="\[\033[1;35m\]"
C_LIGHTCYAN="\[\033[1;36m\]"
C_BG_BLACK="\[\033[40m\]"
C_BG_RED="\[\033[41m\]"
C_BG_GREEN="\[\033[42m\]"
C_BG_YELLOW="\[\033[43m\]"
C_BG_BLUE="\[\033[44m\]"
C_BG_PURPLE="\[\033[45m\]"
C_BG_CYAN="\[\033[46m\]"
C_BG_LIGHTGRAY="\[\033[47m\]"
# Make ls use colors
export CLICOLOR=1
alias ls='ls -Fa'
#coloured man pages
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'
export LESSOPEN="|~/bin/lesspipe.sh %s"
# define some colours
GREY=$'\033[1;30m'
RED=$'\033[1;31m'
GREEN=$'\033[1;32m'
YELLOW=$'\033[1;33m'
BLUE=$'\033[1;34m'
MAGENTA=$'\033[1;35m'
CYAN=$'\033[1;36m'
WHITE=$'\033[1;37m'
NONE=$'\033[m'
#random grep color
export GREP_COLOR="1;3$((RANDOM%6+1))"
export GREP_OPTIONS='--color=auto'
export GRC_HOME=~/.grc
###########
# history #
###########
export HISTFILESIZE=10000
export HISTSIZE=10000
shopt -s histappend
export HISTIGNORE="[bf]g:[ ]*:exit"
export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S "
shopt -s histreedit
shopt -s histverify
export HISTCONTROL="ignorespace:erasedups"
# Easily re-execute the last history command.
alias r="fc -s"
########
# path #
########
export HOSTFILE=~/.hosts
export PATH="~/julia:~/Dropbox/bin:/usr/local/share/python/:~/bin:/usr/local/bin:$PATH:/usr/local/sbin"
###################
# welcome message #
###################
clear
echo -e "Welcome, Ronert"
echo -e ""
echo -ne "Today is "; date
echo -e ""
#######
# ssh #
#######
if [[ -e ~/.ssh/known_hosts ]]; then
complete -o default -W "$(cat ~/.ssh/known_hosts | sed 's/[, ].*//' | sort | uniq | grep -v '[0-9]')" ssh
fi
###########################
# Python virtualenv setup #
###########################
export WORKON_HOME=$HOME/domains
source /usr/local/share/python/virtualenvwrapper.sh
export PIP_VIRTUALENV_BASE=$