-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.aliases
66 lines (55 loc) · 1.77 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
# Aliases used by Bash and Fish (same syntax)
# Lazy
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias l='ls -la'
# Colors ON
alias ls='ls --color=auto'
alias grep='grep --color' # in Termux: pkg install grep
# Docker
alias docker-gc='docker system prune'
# JSON
alias json-pp='python -m json.tool'
# Tmux: have a different session for each path
alias temu='tmux new -A -D -s $PWD'
# Web
# curl -L https://raw.github.com/aureliojargas/css-grep/master/css-grep.txt > ~/.css.txt
alias css='cat ~/.css.txt | grep -i'
# VS Code
# List of absolute paths for files in the current dir.
# Use it from VS Code Terminal and click a path to open it in the editor.
alias code-files='find "$PWD" -type f | grep -Fv /.git/'
# Fish
alias fish-my-config='find ~/.config/fish/ -not -type d'
# Git aliases
alias gg='git grep --line-number'
alias ggf='git grep-filename'
alias gs='git status'
alias gw='git show'
alias gws='git show --stat'
alias gsl='git stash list'
alias gsd='git stash show -p stash@{0}'
alias gd='git diff'
alias gdw='GIT_PAGER= git diff' # wrap long lines
alias gdc='git diff --cached'
alias ga='git add'
alias gau='git add -u'
alias gap='git add -p'
alias grp='git reset -p'
alias gc='git commit'
alias gca='git-pre-commit; git commit --amend'
alias gcaa='git commit --amend --no-verify --no-edit'
alias gcm='git commit-message'
alias gpf='git push --force-with-lease --force-if-includes' # safer force-push
alias gpu='git push -u'
alias gb='git branch'
alias gba='git branch -va'
alias gr='git remote -v'
alias gl='git log4'
alias gl2='git log2'
alias gl3='git log3'
# ed: Show a ruler as reference to git commit 50/72 max width
alias ed-ruler="echo '-----------------------------------------------50|-------------------72|'"
# vim: filetype=sh