-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbash_profile
More file actions
98 lines (84 loc) · 3.21 KB
/
bash_profile
File metadata and controls
98 lines (84 loc) · 3.21 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
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
#!/usr/bin/env bash
#Bash profile script. 'source' this from your ~/.bash_profile and customize the SCRIPTS variable.
#Any non generic commands (e.g. company or personal laptop specific) can be referenced/sourced from .bash_profile_ext
#Note that ~ doesn't seem to play well with variables, so using full path
export SCRIPTS="/Users/shaunabram/dev/scripts"
echo in $SCRIPTS/bash_profile_shared.sh
export PATH=$PATH:$SCRIPTS
echo sourcing ~/.bash_profile_ext ...
echo
source ~/.bash_profile_ext
alias l='ls -alt'
alias ip="ifconfig | grep 'net ' | grep -v 127.0.0.1"
alias vibp='vi $SCRIPTS/bash_profile'
alias viBP='vi ~/.bash_profile'
alias vibpe='vi ~/.bash_profile_ext'
alias catbp='cat $SCRIPTS/bash_profile'
alias catbpe='cat ~/.bash_profile_ext'
alias catBP='cat ~/.bash_profile'
alias srcbp='source ~/.bash_profile'
#alias vilaunch="sudo vi /etc/launchd.conf"
#alias catlaunch="cat /etc/launchd.conf"
alias Docs="cd ~/Documents/"
alias tmp="cd ~/Documents/tmp"
alias del="cd ~/Documents/del"
#alias tl="cd ~/dev/testlab"
alias dev="cd ~/dev"
alias scripts="cd ~/dev/scripts"
alias gitfiles="cd ~/dev/gitfiles"
##########
#mvn start
##########
alias mt="mvn test"
alias mc="mvn clean"
alias mi="mvn install"
alias mci="mvn clean install"
alias mcis="mvn clean install -Dmaven.test.skip=true"
alias mciu="mvn clean install -U"
alias mcius="mvn clean install -U -Dmaven.test.skip=true"
#alias mis="mvn install -Dmaven.test.skip=true"
#alias j="mvn jetty:run -Djetty.port=8080"
#alias jp="mvn jetty:run -Dlc.profile=lcperf -Djetty.port=8080"
#alias t="mvn tomcat7:run"
#alias tdev="mvn tomcat7:run -Dlc.profile=lcdev"
#alias tdemo="mvn tomcat7:run -Dlc.profile=demo"
#alias t1="mvn tomcat7:run -Dtomcat.port=8081"
#alias tp="mvn tomcat7:run -Dlc.profile=lcperf"
#alias adhoc="mvn tomcat7:run -Dspring.profiles.active=nodeAdHoc"
alias dtree="mvn dependency:tree"
##########
#mvn end
##########
##########
# git
##########
echo "sourcing /Users/shaunabram/dev/gitfiles/git.sh"
source /Users/shaunabram/dev/gitfiles/git.sh
git config --global core.excludesfile '/Users/shaunabram/dev/gitfiles/.gitignore'
#source ~/git-completion.bash
#alias glog='git log origin/development..development'
#alias glog2='git log origin/develop..develop'
#alias gdiff='git diff origin/development..development'
#alias gdiff2='git diff origin/develop..develop'
#alias vigc="vi ~/.gitconfig"
#alias catgc="cat /Users/shaunabram/dev/gitfiles/.gitconfig"
#alias s='git status'
echo "sourcing source ~/dev/scripts/.git-prompt.sh (if not found, copy from https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh"
source ~/dev/scripts/git-prompt.sh
PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
#Prompt configuration, including adding git branch to prompt
# Add this to your ~/.bash_profile or ~/.bashrc
# Function to extract the current Git branch
parse_git_branch() {
git branch 2>/dev/null | sed -n '/\* /s///p'
}
# Function to detect uncommitted changes
parse_git_dirty() {
[[ $(git status --porcelain 2>/dev/null) != "" ]] && echo "*"
}
# Light green for path, bright green for branch, red for dirty indicator
export PS1="\[\033[92m\]\w \[\033[32m\](\$(parse_git_branch)\[\033[31m\]\$(parse_git_dirty)\[\033[32m\])\[\033[00m\]\$ "
export PS1
##########
# git END
##########