-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.aliases
67 lines (59 loc) · 2.01 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
#!/usr/bin/env bash
###### Shortcuts
alias h='history'
alias j='jobs'
# GIT Aliases
alias g='git'
alias gf='git fetch'
alias gd='git diff'
alias gas='git add'
alias gaa='git add .'
alias gb='git branch'
alias gs='git status -s'
alias gsf='git status'
alias gc='git checkout'
alias gcm='git commit -m'
alias gcb='git checkout -b'
alias gpo='git push origin'
alias glo='git log --oneline'
alias glcg="git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
alias grh='git reset --hard'
alias gri='git rebase -i'
alias gra='git rebase --abort'
alias grc='git rebase --continue'
alias gpf='git push -f'
alias gsl='git stash list'
alias gsp='git stash pop'
# Docker aliases
alias d='docker $*'
alias d-c='docker-compose $*'
###### Changing directories
# Parent dirs
alias root='cd ~/'
alias ..='cd ../..'
alias ...='cd ../../..'
alias ....='cd ../../../..'
alias .....='cd ../../../../..'
# Directories shortcuts
alias main='cd ~/Programming'
alias books='cd ~/Books'
###### Overrides
alias cat='ccat'
alias l='ls -lF -G' # List all files colorized in long format
alias la='ls -laF -G' # List all files colorized in long format, including dot files
alias lsd='ls -lF -G | grep --color=never "^d"' # List only directories
alias ls='command ls -G' # Always use color output for `ls`
alias grep='grep --color=auto' # Always enable colored `grep` output
###### Methods/Helpers
alias cleanup="find . -type f -name '*.DS_Store' -ls -delete"
alias path='echo -e ${PATH//:/\\n}'
alias pass="openssl rand -base64 $1"
alias port_is_used="nc -l $1"
alias process_id="lsof -wni tcp:$1"
alias new-alias='python ~/.new-alias'
###### Other
# Get macOS Software Updates, and update installed Ruby gems, Homebrew, npm, and their installed packages
alias update='sudo softwareupdate -i -a; brew update; brew upgrade; brew cleanup; sudo gem cleanup'
# Open Google Chrome
alias chrome='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome'
alias list='exa --long -H --header --git'