-
Notifications
You must be signed in to change notification settings - Fork 185
/
.aliases
87 lines (81 loc) · 2.4 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
# Navigation
alias ..='cd ..'
alias ...='cd ../..'
alias .3='cd ../../..'
alias .4='cd ../../../..'
alias .5='cd ../../../../..'
alias ~='cd ~'
alias -- -='cd -'
alias 1='cd -'
alias 2='cd -2'
alias 3='cd -3'
alias 4='cd -4'
alias 5='cd -5'
# Easy report
alias ls='ls -Fh --color=auto --group-directories-first'
alias grep='grep --color=auto'
alias l='ls -l'
alias la='ls -lA'
alias lr='ls -R'
alias lf='ls -l | grep "^-"'
alias l.f='ls -ld .* | grep "^-"'
alias ld='ls -l | grep "^d"'
alias l.d='ls -ld .* | grep "^d"'
alias dud='du -d 1 -h'
alias duf='du -sh *'
alias fdir='find . -type d -name'
alias ff='find . -type f -name'
alias h='history'
alias hgrep='history | grep'
alias lgrep='ls -l | grep'
alias lagrep='ls -lA | grep'
alias sgrep='grep -R -n -H -C 5 --exclude-dir={.git,.svn,node_modules,tealdeer,Trash,vendor}'
alias cp='cp -iv'
alias mv='mv -iv'
alias ln='ln -iv'
alias mkdir='mkdir -v'
alias rm='rm -i'
alias rmf='rm -rf'
alias p='ps axo pid,user,pcpu,comm'
alias uptime='uptime -p'
alias free='free -h'
alias disk='df -h | grep sd \
| sed -e "s_/dev/sda[1-9]_\x1b[34m&\x1b[0m_" \
| sed -e "s_/dev/sd[b-z][1-9]_\x1b[33m&\x1b[0m_" \
| sed -e "s_[,0-9]*[MG]_\x1b[36m&\x1b[0m_" \
| sed -e "s_[0-9]*%_\x1b[32m&\x1b[0m_" \
| sed -e "s_9[0-9]%_\x1b[31m&\x1b[0m_" \
| sed -e "s_/mnt/[-_A-Za-z0-9]*_\x1b[34;1m&\x1b[0m_"'
alias alu='apt list --upgradable'
alias preview='fzf --height=50% --layout=reverse --preview="bat --color=always {}"'
# Bookmarks
alias dl='cd ~/Downloads && ls -lA'
alias doc='cd ~/Documents && ls -lA'
alias tmp='cd ~/Temporary && ls -lA'
# Shortcuts
alias c='clear'
alias cat='bat'
alias ch='echo > ~/.bash_history && echo > ~/.zsh_history'
alias cz='echo > ~/.z'
alias e='exit'
alias htop-user='htop -u "$USER"'
alias mdv='glow -p -s ~/.config/glow/Material-Theme-Darker.json'
alias mp3-dl='yt-dlp --ignore-config --extract-audio \
--audio-format "mp3" --audio-quality 0 --embed-thumbnail --embed-metadata \
--output "$HOME/Downloads/%(title)s.%(ext)s"'
alias n='nnn'
alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'
alias timer='echo "Timer started. Stop with Ctrl-D." && date "+%a, %d %b %H:%M:%S" && time cat && date "+%a, %d %b %H:%M:%S"'
# Developer shortcuts
alias g='git'
alias python='python3'
alias s='subl'
alias v='nvim'
# PHP
alias art='php artisan'
alias artisan='php artisan'
# Typos
alias :q='exit'
alias help='man'
alias quit='exit'