-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
62 lines (49 loc) · 2.14 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
# Enable custom scripts in ~/bin/
export PATH=$HOME/bin:$PATH
# Make svn diff colours work
export TERM=xterm-color
# (Linux) Make directories more visible on a black background: i.e. light blue, not dark blue
#export LS_COLORS=$(echo $LS_COLORS|sed 's/di=01;34/di=01;36/')
#eval $(dircolors|sed 's/di=01;34/di=01;36/')
# Aliases for Linux
alias ls="ls --color"
# Aliases for Mac
#alias ls="ls -G"
# Aliases for Linux
alias ls="ls --color"
# Prompt for Dell
export PS1="\[\e[1;32m\]Dell\[\e[0m\] [\A\$(jobs | awk '{ print \$3 }' | tr '\n' '|' | awk '{ print \"\[\033[1;31m|\]\" \$1 \"\[\033[0m\]\" }') \[\033[1;36m\]\$(git branch 2>/dev/null | grep '*' | cut -c 3-)\[\033[0m\] \W$] "
# Prompt for Mac
#export PS1="[Mac] \w \$ "
# Avoid duplicates
export HISTCONTROL=ignoredups:erasedups
# When the shell exits, append to the history file instead of overwriting it
shopt -s histappend
# Eternal bash history.
# ---------------------
# Undocumented feature which sets the size to "unlimited".
# http://stackoverflow.com/questions/9457233/unlimited-bash-history
export HISTFILESIZE=
export HISTSIZE=
export HISTTIMEFORMAT="[%F %T] "
# Change the file location because certain bash sessions truncate .bash_history file upon close.
# http://superuser.com/questions/575479/bash-history-truncated-to-500-lines-on-each-login
export HISTFILE=~/.bash_eternal_history
# Force prompt to write history after every command.
# http://superuser.com/questions/20900/bash-history-loss
#PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
# After each command, append to the history file and reread it
# (need this to NOT change history within each session/terminal console window)
#export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"
# TODO: Install keychain. Example output:
# * keychain 2.8.5 ~ http://www.funtoo.org
# * Found existing ssh-agent: 32340
# * Adding 1 ssh key(s): ....
# * ssh-add: Identities added: ...
# Mac keychain
#job=....
#/usr/bin/keychain --nogui ~/.ssh/id_rsa.$job"_puppet"
#/usr/bin/keychain --nogui ~/.ssh/id_rsa.$job"_bitbucket"
#source $HOME/.keychain/$HOSTNAME-sh
# Paths
export PATH="$HOME/alt/linux-scripts:$PATH"