-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaliases
41 lines (31 loc) · 1.11 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
alias mkdir="mkdir -p"
# Pretty print the path
alias path='echo $PATH | tr -s ":" "\n"'
# Find files
alias grep="grep --color=auto"
alias rgf="rg --files --glob"
# Use neovim if available over vim
if command -v nvim >/dev/null 2>&1; then
alias vim="nvim"
fi
# Alias raw man to colorman function
alias man="colorman"
# Reload zshrc like a rails console
alias reload!=". ~/.zshrc"
# Alias ls to something better
if command -v eza >/dev/null 2>&1; then
alias ls="eza --color=auto --group-directories-first"
alias lsf="eza --all --all --long --header --group --group-directories-first --time-style long-iso --git"
alias lst="eza --all --group-directories-first --ignore-glob '*.git' --git-ignore --tree"
fi
# A better cat
if command -v bat >/dev/null 2>&1; then
alias cat="bat"
fi
# Lists files (including dot files) sorted by size (biggest last) in long and
# human readable output format.
alias dir="ls -lSra"
alias cop="bin/rubocop --parallel --display-cop-names --display-style-guide"
# Include custom aliases
[[ -f ~/.aliases.host ]] && source ~/.aliases.host
[[ -f ~/.aliases.local ]] && source ~/.aliases.local