forked from dikiaap/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.aliases
89 lines (82 loc) · 2.52 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
88
89
# easy to navigation
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ~='cd ~'
alias -- -='cd -'
# easy report
alias l='ls -lFh'
alias la='ls -lAFh'
alias lr='ls -tRFh'
alias lf='ls -lFh | grep "^-"'
alias l.f='ls -lFdh .* | grep "^-"'
alias ld='ls -lFh | grep "^d"'
alias l.d='ls -lFdh .* | 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 -lFh | grep'
alias sgrep='grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS}'
alias cp='cp -iv'
alias mv='mv -iv'
alias rm='rm -i'
alias rmf='rm -rf'
alias p='ps axo pid,user,pcpu,comm'
alias sizeof='wget --no-config --spider'
alias uptime='uptime -p'
alias free='free -h'
alias df='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 disk='df'
alias alu='apt list --upgradable'
# bookmarks
alias dl='cd ~/Downloads; la'
alias doc='cd ~/Documents; la'
alias docs='cd ~/Documents; la'
alias tmp='cd ~/Temporary; la'
# shortcuts
alias c='clear'
alias cat='ccat'
alias ch='echo > ~/.bash_history && echo > ~/.zsh_history'
alias cz='echo > ~/.z'
alias e='exit'
alias fresh='cd . && lxterminal && quit'
alias gpg='gpg2'
alias incognito='unset HISTFILE'
alias ln='ln -s'
alias mp3-dl='youtube-dl --audio-quality 1 --extract-audio --audio-format mp3'
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"'
alias weather='curl -s wttr.in/Ponorogo | sed -n "1,17p"'
# developer shortcuts
alias g='git'
alias git-pull-dir='find . -mindepth 1 -maxdepth 1 -type d -print -exec git -C {} pull \;'
alias python='python3.5'
alias s='subl'
alias v='nvim'
# php
alias art='php artisan'
alias artisan='php artisan'
# typos
alias :q='exit'
alias help='man'
alias nano='vim'
alias quit='exit'
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto --group-directories-first'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi