forked from mostlygeek/shell-stuff
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbashrc
More file actions
54 lines (46 loc) · 1.28 KB
/
bashrc
File metadata and controls
54 lines (46 loc) · 1.28 KB
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
if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
return
fi
#check for source bashrc
if [ -f /etc/bash/bashrc ]; then
. /etc/bash/bashrc
fi
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
# git-completion
if [ -f ~/.git-completion.sh ]; then
. ~/.git-completion.sh
fi
function git_prompt {
local STATUS=`git branch 2>/dev/null | grep -e '\*' 2>&1`
if [[ "$STATUS" == *'Not a git'* ]]
then
return
else
echo "(${STATUS:2})"
fi
}
#PS1="[\u@\h \W]$ "
PS1="\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] "
PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\] $(git_prompt)\n$ '
PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\] $(__git_ps1 "(%s)")\n$ '
#PS1='[%n@%m %c$(__git_ps1 " (%s)")]\$ '
#PS1='\[\033[01;32m\]\u\[\033[0:33m\]@\[\033[01;32m\]\h\[\033[01;34m\] \w $\[\033[00m\] '
# auto start screen
#if [ -z "$STY" ]; then
# exec screen -dRR
#fi
# bash aliases
alias g='git'
#alias ls='ls --color=auto'
alias ls='ls -lah'
alias sprunge="curl -F 'sprunge=<-' http://sprunge.us"
if [ "$(uname)" == "Darwin" ]; then
alias ctags="`brew --prefix`/bin/ctags"
fi
#ls colors
export CLICOLOR=1
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
[[ -s $HOME/.nvm/nvm.sh ]] && . $HOME/.nvm/nvm.sh # This loads NVM