-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bash_aliases
105 lines (92 loc) · 3.38 KB
/
.bash_aliases
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
#------------------------------------------------------------------------------
#BOP
#
# !MODULE: .bash_aliases
#
# !DESCRIPTION: A .bashrc-style file that you can use to contain your own
# personal settings for Git-bash on Windows. Contains useful settings for
# connecting to the Amazon Web Services cloud computing environment.
# Feel free to add/change/remove any of these settings as you wish.
#\\
#\\
# !CALLING SEQUENCE:
# source ~/.bash_aliases
# (will also be called each time you source ~/.bashrc)
#
# !AUTHOR
# Bob Yantosca (yantosca@seas.harvard.edu), 20 Dec 2018
#
# !REVISION HISTORY:
# Use the gitk browser to view the revision history!
#EOP
#------------------------------------------------------------------------------
#BOC
#==============================================================================
# %%%%% Personal settings: Look-and-feel customizations %%%%%
#==============================================================================
# Settings for colorization
export GREP_COLOR=32
export LS_COLORS='no=00:fi=00:di=01;33:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;37:*.tgz=01;37:*.arj=01;37:*.taz=01;37:*.lzh=01;37:*.zip=01;37:*.z=01;37:*.Z=01;37:*.gz=01;37:*.bz2=01;37:*.deb=01;37:*.rpm=01;37:*.jar=01;37:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.flac=01;35:*.mp3=01;35:*.mpc=01;35:*.ogg=01;35:*.wav=01;35:'
#==============================================================================
# %%%%% Personal settings: Basic Unix commands %%%%%
#==============================================================================
# General Unix commands
alias disk="du -h -s -c"
alias g="grep -in --color=auto"
alias gt="grep -in --text"
alias m="less"
alias me="xterm &"
alias proc="ps -ef | grep $USER | sort"
alias pu="rm *~"
alias pua="rm .*~"
alias sb=". ~/.bashrc"
alias sba=". ~/.bash_aliases"
alias tf="tail --follow"
alias zap="kill -9"
alias cd="cd -P"
alias c="clear"
alias h="history"
alias diff="colordiff"
alias rm="rm -Iv"
alias cp="cp -v"
alias mv="mv -v"
# Directory listing commands
alias ls="ls -CF --time-style=long-iso --color=auto"
alias l1="ls -1"
alias ll="ls -l"
alias llt="ls -lt"
alias lltm="ls -lt | less"
alias la="ls -a"
alias lla="ls -la"
alias llh="ls -lh"
# Convert a windows file to Unix
function dos2unix() {
awk '{ sub("\r$", ""); print }' $1 > $2
}
# Tmux aliases
alias tmuxnew="tmux new -s "
alias tmuxat="tmux a -t "
alias tmuxde="tmux detach "
#==============================================================================
# %%%%% Personal settings: Git commands %%%%%
#==============================================================================
# Basic Git commands
alias gui="git gui &"
alias gk="gitk &"
alias gka="gitk --all &"
alias gpo="git pull origin"
alias gl="git log"
alias glo="git log --oneline"
alias glp="git log --pretty=format:'%h : %s' --topo-order --graph"
alias getenv="cd ~/env; git pull origin master"
alias update_tags="git tag -l | xargs git tag -d && git fetch -t"
# Remove a remote branch
function gbrd() {
git branch -r -d origin/$1
}
# Remove local and remote branches
function gprune() {
git branch -d $1
gbrd $1
}
#EOC