-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmbashrc
More file actions
executable file
·60 lines (47 loc) · 1.14 KB
/
mbashrc
File metadata and controls
executable file
·60 lines (47 loc) · 1.14 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
55
56
57
58
59
#!/bin/bash
# set up temp dir
#TMP=/tmp/michael
#[ -d $TMP ] || mkdir $TMP
[ -e /tmp/$USER ] || mkdir /tmp/$USER
[ -e $HOME/temp ] || ln -s /tmp/$USER $HOME/temp
if ! echo $PATH | grep $HOME/bin > /dev/null ; then
PATH=$HOME/bin:$PATH
fi
if [ -d $HOME/localbin ]
then
PATH=$PATH:$HOME/localbin
fi
if [ -d $HOME/.bin ]
then
PATH=$PATH:$HOME/.bin
fi
if [ -d $HOME/.scripts ]
then
PATH=$PATH:$HOME/.scripts
fi
if [ -d $HOME/.local/bin ]
then
PATH=$PATH:$HOME/.local/bin
fi
if [ -d $HOME/devbin ]
then
PATH=$PATH:$HOME/devbin
fi
export TMP PATH
function color_my_prompt {
local __user_and_host="\[\033[01;32m\]\u@\h"
local __cur_location="\[\033[01;34m\]\w"
local __git_branch_color="\[\033[31m\]"
local __git_branch='`git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`'
local __prompt_tail="\[\033[35m\]$"
local __last_color="\[\033[00m\]"
export PS1="$__user_and_host $__cur_location $__git_branch_color$__git_branch$__prompt_tail$__last_color "
}
color_my_prompt
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac