-
Notifications
You must be signed in to change notification settings - Fork 2
/
aliases
executable file
·91 lines (79 loc) · 1.73 KB
/
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
#
# Git
#
# vim/neovim
if type nvim > /dev/null 2>&1; then
alias vim='nvim'
fi
# git
alias gws='git status -sb'
alias gb='git branch -vv'
alias gc='git commit --verbose'
alias gca='git commit --verbose --all'
alias gcf='git commit --fixup HEAD'
alias gco='git checkout'
alias gia='git add'
alias giA='git add --patch'
alias gm='git merge'
alias gp='git push'
alias gpf='git push --force-with-lease'
alias gr='git rebase'
alias gra='git rebase --abort'
alias grc='git rebase --continue'
alias gri='git rebase --interactive'
alias gs='git stash'
alias gwd='git diff --no-ext-diff'
alias gu='git reset HEAD~1' # undo the last commit
alias gl='gll -20'
alias gl-not-updates="gll --author='^(?!dependabot).*$' --perl-regexp"
alias gll="git log --pretty='format:%C(yellow)%h %C(blue)%ad %C(reset)%s%C(red)%d %C(green)%an%C(reset), %C(cyan)%ar' --date=short"
#
# ls
#
alias l='ls -1A' # one column
alias ll='ls -lhFg' # lists w/human sizes
alias la='ls -alhFg' # lists w/human sizes, w/hidden
alias lr='ll -R' # lists w/human sizes, recursively
#
# cat
#
alias cat='bat --theme=OneHalfDark'
#
# df/du
#
alias df='df -kh'
alias du='du -kh'
#
# Grep
#
alias grep='grep --color=auto'
#
# Bundle
#
alias be='bundle exec'
#
# Tree
#
alias tree='tree -aI ".git|node_modules|tmp|vendor"'
#
# Pretty print the PATH
#
alias path='echo $PATH | tr -s ":" "\n"'
#
# Reload Rubies
#
alias reload-rubies="source $CHRUBY_PREFIX/share/chruby/chruby.sh"
#
# Docker
#
alias dki="docker run -t -i -P"
db() { docker build -t="$1" .; }
alias dip="docker inspect --format '{{ .NetworkSettings.IPAddress }}'"
drm() { docker rm $(docker ps -q -a); }
dri() { docker rmi $(docker images -q); }
de() {
container_id=$1
shift
cmd=${@:-"/bin/bash"}
docker exec -it "$container_id" "$cmd"
}