-
Notifications
You must be signed in to change notification settings - Fork 2
/
.bash_options
89 lines (74 loc) · 2.75 KB
/
.bash_options
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
#!/bin/bash
# sourced by .bashrc
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ];
then debian_chroot=$(cat /etc/debian_chroot)
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix;
then . /etc/bash_completion
fi
# check for browser
if [ -z "$DISPLAY" ]; then
BROWSER=elinks
else
BROWSER=chromium-browser
fi
# Set some variables
EDITOR=/usr/bin/vim
VISUAL=/usr/bin/vim
MPD_PORT=6600
MPD_HOST=127.0.0.1
PAGER=/bin/less
GREP_OPTIONS='--colour=auto'
GREP_COLOR='1;30;43'
# bash options
shopt -s autocd # cd by naming directory
shopt -s cdable_vars # if cd arg is not valid, assumes its a var defining a dir
shopt -s cdspell # autocorrects cd misspellings
shopt -s checkwinsize # update the value of LINES and COLUMNS after each command if altered
shopt -s cmdhist # save multi-line commands in history as single line
shopt -s dotglob # include dotfiles in pathname expansion
shopt -s expand_aliases # expand aliases
shopt -s extglob # enable extended pattern-matching features
shopt -s histappend # append to (not overwrite) the history file
shopt -s hostcomplete # attempt hostname expansion when @ is at the beginning of a word
shopt -s nocaseglob # pathname expansion will be treated as case-insensitive
# Bash completion
set show-all-if-ambiguous on
# Set the options for the historyfile
shopt -s histappend
HISTCONTROL=ignoredups
HISTIGNORE="&:ls:ll:la:cd:exit:clear"
HISTSIZE=20000
HISTFILESIZE=20000
HISTTIMEFORMAT="[%Y-%m-%d - %H:%M:%S] "
# fix locales
LANGUAGE=en_US.UTF-8
LC_ALL=en_US.utf8
# Java exports
#export PATH=$PATH:/usr/share/java/apache-ant/bin
# Ruby rvm exports
[[ -s "/home/xbmc/.rvm/scripts/rvm" ]] && source "/home/xbmc/.rvm/scripts/rvm"
# Python virtual environment settings
export VIRTUALENV_WRAPPER_PATH=/usr/local/bin/virtualenvwrapper.sh
export WORKON_HOME=~/.virtualenvs
export DJANGO_SITES_ROOT=$HOME/projects/
source $VIRTUALENV_WRAPPER_PATH
# Go Language
# goto homedir and clone:
# hg clone -u release https://code.google.com/p/go
export GOROOT=$HOME/go
export GOARCH=386
export GOOS=linux
export GOBIN=$GOROOT/bin
export PATH=$PATH:$GOBIN
# Play Language
export PATH=$PATH:$HOME/apps/play/
# export custom user directories to PATH
export PATH=$PATH:$HOME/scripts:$HOME/bin:/sbin
export PATH=$PATH:$HOME/Dropbox/school/cis451/bin
# EXPORT ALL VARIABLES NOW
export LANGUAGE LC_ALL HISTCONTROL HISTIGNORE HISTSIZE HISTFILESIZE HISTTIMEFORMAT GREP_OPTIONS PAGER MPD_HOST MPD_PORT BROWSER EDITOR VISUAL GREP_COLOR