-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaliases
80 lines (54 loc) · 2.67 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
#!/bin/sh
# vim:set ft=sh et sw=4 sts=4:
export OS="$(get_os)"
if [ "$OS" == "osx" ]; then
# Hide/Show desktop icons
alias hide-desktop-icons="defaults write com.apple.finder CreateDesktop -bool false && killall Finder"
alias show-desktop-icons="defaults write com.apple.finder CreateDesktop -bool true && killall Finder"
# Hide/Show hidden files in Finder
alias hide-hidden-files="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder"
alias show-hidden-files="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder"
elif [ "$OS" == "ubuntu" ]; then
# Hide/Show desktop icons
alias hide-desktop-icons="gsettings set org.gnome.desktop.background show-desktop-icons false"
alias show-desktop-icons="gsettings set org.gnome.desktop.background show-desktop-icons true"
fi
# mdfind -onlyin / kMDItemKind==Application
#alias mdfind='mdfind -onlyin .'
alias G="grep -i"
alias g="grep"
alias h="heroku"
alias download_history="sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'select LSQuarantineDataURLString from LSQuarantineEvent'"
alias flush='LC_ALL=C tr -c "[:digit:]" " " < /dev/urandom | dd cbs=$COLUMNS conv=unblock | GREP_COLOR="1;32" grep --color "[^ ]"'
#alias top10='cat .bash_history | awk '{CMD[$1]++;count++;} END { for (a in CMD) printf "%s %.2f%s %s\n", CMD[a], CMD[a]/count*100, "%", a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n 10'
alias vless='/usr/share/vim/vim73/macros/less.sh'
alias cd..='cd ..'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias duh='du -h --max-depth=1'
alias dirf='find . -type d | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/"'
alias irc="ssh -t vervet screen -rdU irc"
alias urg="mutt -Rf /home/stu/Mail/urgmatch"
alias dim="mutt -Rf /home/stu/Mail/dimins"
alias mim="mutt -Rf /home/stu/Mail/mfolder"
# this option is exported in ~/.bashrc's GREP_OPTIONS
#alias grep="grep --color=auto"
alias free="free -m"
alias sls="screen -ls"
alias srd="screen -rd"
alias lynx="lynx -accept_all_cookies"
alias cdcgi="cd ~/public_html/cgi-bin/"
# listing aliases # git://github.com/davidmiller/mydotfiles.git
alias ls="ls --color=auto"
alias ll='ls -hlrt'
alias lx='ls -lXB' # sort by extension
alias lk='ls -lSr' # sort by size
alias lsa='ls -lah' # list including .dotfiles
alias lsf='ls -lh | grep "^-"'
alias lsd='ls -lh | grep "^d"' # list only directories
alias lsl='ls -lh | grep "^l"' # list only links
alias vio='vi -O'
# alias dotfiles='git --git-dir=$HOME/.dotfiles.git/ --work-tree=$HOME'
# complete -o bashdefault -o default -o nospace -F _git dotfiles
# vim:filetype=sh