forked from IainNZ/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbashrc
83 lines (71 loc) · 3.11 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
#############################################################################
# Iain's Customized bashrc
#############################################################################
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
#############################################################################
# HISTORY OPTIONS
#############################################################################
# Don't put duplicate lines or lines starting with space in the history.
HISTCONTROL=ignoreboth
# Append to the history file, don't overwrite it.
shopt -s histappend
# Number of lines to keep in memory and in the file respectively
HISTSIZE=10000
HISTFILESIZE=10000
# 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
#############################################################################
# WINDOW OPTIONS
#############################################################################
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
#############################################################################
# VISUAL OPTIONS
#############################################################################
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# Prompt config
#export PS1='\e[1;30m\u@\h:\e[m \e[1;31m\w\e[m$ '
#export PS1='\u@\h: \w$ '
# http://www.kirsle.net/wizards/ps1.html
export PS1="\[$(tput bold)\]\[$(tput setaf 0)\]\u@\h:\[$(tput setaf 1)\]\w\$ \[$(tput sgr0)\]"
# Reduce size of current working directory
PROMPT_DIRTRIM=2
# Set the title of the window
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
#############################################################################
# ALIASES
#############################################################################
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
#############################################################################
# EXPORTS
#############################################################################
export GUROBI_LIB=/opt/gurobi560/linux64/lib/libgurobi56.so
export GUROBI_HOME=/opt/gurobi560/linux64/
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GUROBI_HOME}lib"
export PATH="$PATH:/home/idunning/julia"
export PATH="$PATH:$HOME/mosek/7/tools/platform/linux64x86/bin"
if [ "$(hostname)" = "che" ]; then
echo "Running on che, use ~/julia and Gurobi 5.6.2"
export GUROBI_HOME=/opt/gurobi562/linux64/
export GUROBI_LIB=/opt/gurobi562/linux64/lib/libgurobi56.so
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GUROBI_HOME}/lib"
export PS1='\u@\h: \w$ '
fi