forked from jaivardhankapoor/bestbash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalias
91 lines (88 loc) · 3.28 KB
/
alias
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
90
91
# ALIAS {{{
alias freemem='sudo /sbin/sysctl -w vm.drop_caches=3'
alias enter_matrix='echo -e "\e[32m"; while :; do for i in {1..16}; do r="$(($RANDOM % 2))"; if [[ $(($RANDOM % 5)) == 1 ]]; then if [[ $(($RANDOM % 4)) == 1 ]]; then v+="\e[1m $r "; else v+="\e[2m $r "; fi; else v+=" "; fi; done; echo -e "$v"; v=""; done'
# GIT_OR_HUB {{{
if which hub &>/dev/null; then
alias git=hub
fi
#}}}
# AUTOCOLOR {{{
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
#}}}
# MODIFIED COMMANDS {{{
alias ..='cd ..'
alias ....='cd ../..'
alias ......='cd ../../..'
alias df='df -h'
alias diff='colordiff' # requires colordiff package
alias du='du -c -h'
alias free='free -m' # show sizes in MB
alias grep='grep --color=auto'
alias grep='grep --color=tty -d skip'
alias mkdir='mkdir -p -v'
alias more='less'
alias nano='nano -w'
alias ping='ping -c 5'
alias c='clear && clear'
alias .bashrc="vim ~/.bashrc"
alias exho='echo'
#}}}
# PRIVILEGED ACCESS {{{
if ! $_isroot; then
alias sudo='sudo '
alias scat='sudo cat'
alias svim='sudoedit'
alias root='sudo su'
alias reboot='sudo reboot'
alias halt='sudo halt'
alias powertop='sudo powertop'
fi
#}}}
# PACMAN ALIASES {{{
# we're on ARCH
if $_isarch; then
# we're not root
if ! $_isroot; then
alias pacman='sudo pacman'
fi
alias pacupg='pacman -Syu' # Synchronize with repositories and then upgrade packages that are out of date on the local system.
alias pacupd='pacman -Sy' # Refresh of all package lists after updating /etc/pacman.d/mirrorlist
alias pacin='pacman -S' # Install specific package(s) from the repositories
alias pacinu='pacman -U' # Install specific local package(s)
alias pacre='pacman -R' # Remove the specified package(s), retaining its configuration(s) and required dependencies
alias pacun='pacman -Rcsn' # Remove the specified package(s), its configuration(s) and unneeded dependencies
alias pacinfo='pacman -Si' # Display information about a given package in the repositories
alias pacse='pacman -Ss' # Search for package(s) in the repositories
alias pacupa='pacman -Sy && sudo abs' # Update and refresh the local package and ABS databases against repositories
alias pacind='pacman -S --asdeps' # Install given package(s) as dependencies of another package
alias pacclean="pacman -Sc" # Delete all not currently installed package files
alias pacmake="makepkg -fcsi" # Make package from PKGBUILD file in current directory
alias changemirror='svim /etc/pacman.d/mirrorlist'
fi
#}}}
# MULTIMEDIA {{{
if which get_flash_videos &>/dev/null; then
alias gfv='get_flash_videos -r 720p --subtitles'
fi
#}}}
# LS {{{
alias ls='ls -hF --color=auto'
alias l='ls -hF --color=auto'
alias lr='ls -R' # recursive ls
alias ll='ls -alh'
alias la='ll -A'
alias lm='la | less'
#}}}
#}}}
#alias for activating env1
#python virtualenv alias
alias venv='source ~/env1/bin/activate'
alias notes='vim ~/notes.txt'
alias speedtest=~/speedtest
alias utime='sudo ntpdate pool.ntp.org'
alias sshlogin='ssh -i ~/sshkey/saket.txt [email protected]'