This repository has been archived by the owner on May 1, 2018. It is now read-only.
forked from nowells/terminal
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.bashrc
109 lines (87 loc) · 2.49 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
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
case `uname` in
IRIX64)
SYS_BASE=sgi
;;
SunOS)
SYS_BASE=sun
;;
Linux)
SYS_BASE=linux
;;
Darwin)
SYS_BASE=mac
;;
*)
SYS_BASE=unknown
;;
esac
BASHRC_CONFIG_DIR=$PWD
if [[ $__REMOTE_TERMINAL_SCRIPT_DIR ]]; then
BASHRC_CONFIG_DIR=$__REMOTE_TERMINAL_SCRIPT_DIR
fi
export __REMOTE_TERMINAL_SCRIPT_DIR=$BASHRC_CONFIG_DIR
# Source global definitions
if [ -f /etc/bashrc ]; then
# Global bashrc
. /etc/bashrc
fi
if [ -r /etc/bash_completion ]; then
# Source completion code.
. /etc/bash_completion
fi
if [ -r $BASHRC_CONFIG_DIR/.bashrc.d/completions/git-completion.bash ]; then
# Source completion code.
. $BASHRC_CONFIG_DIR/.bashrc.d/completions/git-completion.bash
fi
if [ -r $BASHRC_CONFIG_DIR/.bashrc.d/completions/hg-completion.bash ]; then
# Source completion code.
. $BASHRC_CONFIG_DIR/.bashrc.d/completions/hg-completion.bash
fi
if [ -f $BASHRC_CONFIG_DIR/.bashrc.d/visual ]; then
# Visual styles
. $BASHRC_CONFIG_DIR/.bashrc.d/visual
fi
if [ -f $BASHRC_CONFIG_DIR/.bashrc.d/exports ]; then
# Exports
. $BASHRC_CONFIG_DIR/.bashrc.d/exports
fi
if [ -f $BASHRC_CONFIG_DIR/.bashrc.d/aliases ]; then
# Aliases
. $BASHRC_CONFIG_DIR/.bashrc.d/aliases
fi
if [ -f $BASHRC_CONFIG_DIR/.bashrc.d/development ]; then
# Development
. $BASHRC_CONFIG_DIR/.bashrc.d/development
fi
if [ -f $BASHRC_CONFIG_DIR/.bashrc.d/functions ]; then
# Functions
. $BASHRC_CONFIG_DIR/.bashrc.d/functions
fi
if [ -f $BASHRC_CONFIG_DIR/.bashrc.d/local ]; then
# Local overrides
. $BASHRC_CONFIG_DIR/.bashrc.d/local
fi
# User specific aliases and functions
umask 002 # allow user + group to write, no other
# append to bash_history if shell quites
shopt -s histappend
# check the window size after each command and, if necessary, update the values of LINES and COLUMNS.
shopt -s checkwinsize
# prevent overwriting files with cat
set -o noclobber
# Stop ctrl+d from logging me out
set -o ignoreeof
# disable Ctrl-S and Ctrl-Q, which suck!
stty -ixon
stty erase ^H
stty ek
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
# Security: close root shells after n seconds of inactivity
[ "$UID" = 0 ] && export TMOUT=180
if [ -f $BASHRC_CONFIG_DIR/lib/j2/j.py ]; then
export JPY=$BASHRC_CONFIG_DIR/lib/j2/j.py
. $BASHRC_CONFIG_DIR/lib/j2/j.sh
fi