-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_aliases
60 lines (47 loc) · 1.43 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
# weather
alias weather="curl -4 http://wttr.in/westford "
# vi to vim
alias vi="vim"
# preconditions vim
alias vim="vim -c 'set spell spelllang=en' -c 'set nowritebackup'"
# color ls
alias ls='ls --color=auto -hF'
# display as a list, sorting by time modified
alias ll='ls -1t'
# display the insides of a particular directory
alias lv='ls -R'
# useful git aliases from TJ Holowaychuk
alias gd="git diff | subl"
alias ga="git add"
alias gbd="git branch -D"
alias gs="git status"
alias gc="git commit -m"
alias gca="git commit -a -m"
alias gm="git merge --no-ff"
alias gpt="git push --tags"
alias gp="git push"
alias grh="git reset --hard"
alias gb="git branch"
alias gcob="git checkout -b"
alias gco="git checkout"
alias gba="git branch -a"
alias gcp="git cherry-pick"
alias gl="git log --pretty='format:%Cgreen%h%Creset %an - %s' --graph"
alias gpom="git pull --rebase origin master"
alias gcd='cd "`git rev-parse --show-toplevel`"'
alias gup="git remote add upstream"
alias gfa="git fetch --all"
# recursively delete `.pyc` files
alias pycleanup="find . -type f -name '*.pyc' -ls -delete"
# ROT13-encode text, works for decoding, too! ;)
alias rot13='tr a-zA-Z n-za-mN-ZA-M'
# add vim encrypt call
alias vime="vim -u ~/.vimencrypt -x"
# enable aliases to be sudo’ed
alias sudo='sudo '
# gzip-enabled `curl`
alias gurl='curl --compressed'
# get week number
alias week='date +%V'
# grep stuff
alias grep='grep --color --binary-files=without-match'