-
Notifications
You must be signed in to change notification settings - Fork 3
/
.bashrc
82 lines (68 loc) · 1.63 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
# -*- sh -*-
#
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# enable programmable completion features
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
### Configuration file may contain
#
# Prefix where useful things are stored in the users file system
# NS_PREFIX=xxx
# e.g. brew-koji zsh completion code. For example set it to $HOME/Work/Miscellaneous
# NS_PREFIX is added to the fpath and used to source zsh-git-prompt.
#
# Any other functions etc can also be put in here.
[[ -f $HOME/.shell-configuration ]] && source $HOME/.shell-configuration
# Defs
if [ -z "$BASH" ]
then
set -o show-all-if-ambiguous on
set -o expand-tilde on
set -o command_oriented_history
set -o glob_dot_filenames
set -o autologout
set -o pushd_silent=true
fi
set -o notify
set -o noclobber
cd()
{
# Need to recognize that there are no arguments so
# we jump to HOME directory correctly.
if [ -z "$@" ]
then
pushd "$HOME" > /dev/null
else
pushd "$@" > /dev/null
fi
}
# List functions the same way as ZSH
alias functions='typeset -f'
#################
### CLASSPATH ###
#################
CLASSPATH=.
###############
### Exports ###
###############
export LD_LIBRARY_PATH
export CLASSPATH
export PATH
#
# Get common aliases and functions
#
source $HOME/.commonshell
[[ -f $HOME/.aliases ]] && source $HOME/.aliases
# Setup prompt and columns
if [[ $- == *i* ]]
then
unset COLUMNS
export COLUMNS
[[ -z "$COLUMNS" ]] && COLUMNS=`tput cols` && echo "Forcing columns value to $COLUMNS"
echo "Running .bashrc..."
export PS1='\[\e[1;32m\]\h:\W $\[\e[0m\] '
fi