-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_profile_windows
110 lines (96 loc) · 3 KB
/
.bash_profile_windows
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
110
# set umask
umask 0022
EDITOR=VIM
CDPATH=:$HOME
ENV=$HOME/.bash_profile
export EDITOR CDPATH ENV TERM
# History file
HISTFILE=$HOME/.bash_history
: ${HISTSIZE:=500}
export HISTSIZE
################
# PATH
################
# export PATH=$(brew --prefix ruby)/bin:$PATH
################
# PROMPT
################
# add git completion
source 'C:/Program Files (x86)/Git/etc/git-completion.bash'
# pull in __git_ps1
source 'C:/Program Files (x86)/Git/etc/git-prompt.sh'
# unstaged (*) and staged(+) changes
export GIT_PS1_SHOWDIRTYSTATE="1"
# whether there are stashed ($) changes
export GIT_PS1_SHOWSTASHSTATE="1"
# if there are untracked (%) files
export GIT_PS1_SHOWUNTRACKEDFILES="1"
# if we're ahead (>) or behind (<) or diverged (<>) relative to upstream
export GIT_PS1_SHOWUPSTREAM="auto"
# set up promt "PATH_IN_GREEN (IF_GIT_BOLD_BLUE) PROMPT_BOLD_GREEN"
export PS1='\[\e[0;32m\]$PWD\[\e[0m\]\[\e[01;34m\]$(__git_ps1 " (%s)")\[\e[0m\] \[\e[1;32m\]\$\[\e[m\] '
################
# COLOR LS
################
# 0 = default colour
# 1 = bold
# 4 = underlined
# 5 = flashing text
# 7 = reverse field
# 31 = red
# 32 = green
# 33 = orange
# 34 = blue
# 35 = purple
# 36 = cyan
# 37 = grey
# 40 = black background
# 41 = red background
# 42 = green background
# 43 = orange background
# 44 = blue background
# 45 = purple background
# 46 = cyan background
# 47 = grey background
# 90 = dark grey
# 91 = light red
# 92 = light green
# 93 = yellow
# 94 = light blue
# 95 = light purple
# 96 = turquoise
# 100 = dark grey background
# 101 = light red background
# 102 = light green background
# 103 = yellow background
# 104 = light blue background
# 105 = light purple background
# 106 = turquoise background
# add colors for git bash shell
LS_COLORS='di=1:fi=0:ln=31:pi=5:so=5:bd=5:cd=5:or=31:mi=0:ex=35:*.rpm=90'
export LS_COLORS
alias ls='ls -F --color --show-control-chars'
################
# CORE ALIASES
################
alias mv="mv -i $*" # ask user before clobbering file
alias rm="rm -i $*" # ask user before clobbering file
alias cp="cp -i $*" # ask user before clobbering file
alias ls="ls -hFG" # add colors for filetype recognition
alias ll="ls -al" # show hidden files
alias lx="ls -lXB" # sort by extension
alias lk="ls -lSr" # sort by size, biggest last
alias lc="ls -ltcr" # sort by and show change time, recent last
alias lt="ls -ltr" # sort by date, recent last
alias lm="ls -al |more" # pipe through 'more'
alias lr="ls -lR" # recursive ls
alias g="git" # faster git!
################
# MAVEN
################
# maven quiet => fix maven logging, no other way to set default level to warn
mvnq() { mvn "$@" > >(egrep -v "(^\[INFO\])") ; }
mvnrun() { echo mvn $@ ; eval mvn $@ ; }
mvnct() { echo $1 | xargs | mvnrun clean test -DfailIfNoTests=false -Dtest=$1 ; }
mvncit() { echo $1 | xargs | mvnrun clean verify -DfailIfNoTests=false -Dtest=$1 -Dit.test=$1 ; }
mvndb() { mvn initialize flyway:clean flyway:migrate ; }