-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaliases
64 lines (49 loc) · 1.72 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
# Verbosity and settings that you pretty much just always are going to want.
alias cp="cp -iv"
alias mv="mv -iv"
alias rm="rm -vI"
alias bc="bc -ql"
alias rsync="rsync -vrPlu"
alias mkd="mkdir -pv"
alias ffmpeg="ffmpeg -hide_banner"
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ~='cd ~'
alias -- -='cd -'
# Colorize commands when possible.
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias ll='ls -halF --color=auto'
alias la='ls -A --color=auto'
alias l='ls -CF'
alias ag='ag --pager="less -r"'
alias grep='grep --color=auto'
alias diff='diff --color=auto'
alias ip='ip -color=auto'
# Force me to use NeoVim
alias vi='nvim'
# COMPLEX AWS USAGE
alias unsetAWS='unset $(env | grep AWS | grep -v AWS_REGION | grep -v AWS_DEFAULT_REGION | sed '\''s|=.*||'\'')'
# Delete local branches that have been merged to master
alias gitClean='git branch --merged | grep -v "^\*\|master\|main\|stable\|develop" | tr -d " " | xargs -r git branch -d'
# Useful if tree is not installed
alias myTree='find . | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/"'
# Easily check Node and NPM versions
alias n='echo "Node: $(node --version)"; echo "NPM: $(npm --version)"'
alias npmGlobalList="npm -g list | grep '^\(├─┬\|└─┬\)'"
alias c='clear'
# Quickly get to dotfiles
alias df='pushd ~/dotfiles'
alias neofetch='neofetch --config ~/dotfiles/neofetch.conf'
alias weather='curl v2.wttr.in/10987'
# Personal Latex development
alias watchLatex='latexmk -pdf -pvc -outdir=output main.tex'
# Delete .DS_Store files in a directory recursively
alias rmDS="find . -type f -name '*.DS_Store' -ls -delete"
# Git fix-up
gfu() {
git commit --fixup="$1";
git rebase -i "$1"~1 --autosquash;
}