-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_aliases
97 lines (90 loc) · 2.15 KB
/
.bash_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
90
91
92
93
94
95
96
97
#!/bin/bash
# standard aliases
if type -P vim &> /dev/null
then
alias vim='vim -X'
alias vi='vim'
fi
if type -P rename &> /dev/null
then
alias rename='rename --verbose'
fi
LS_OPTIONS='--color=auto --classify --human-readable'
alias aoeu='echo us;setxkbmap us'
alias asdf='echo dvorak;setxkbmap dvorak'
alias bc='bc -l'
alias chcon='chcon --verbose'
alias chgrp='chgrp --changes'
alias chmod='chmod --changes'
alias chown='chown --changes'
alias cp='cp --verbose --interactive'
alias df='df --si --human-readable --print-type'
alias dscverify='dscverify --keyring ~/.gnupg/pubring.gpg'
alias du='du --human-readable'
alias e='emacsclient --create-frame --alternate-editor='
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l="ls $LS_OPTIONS --almost-all"
alias ll="ls $LS_OPTIONS --format=long --all"
alias ln='ln --verbose --interactive'
alias ls="ls $LS_OPTIONS"
alias mdstat='cat /proc/mdstat'
alias mkdir='mkdir --verbose'
alias mv='mv --verbose --interactive'
alias pwed="vim $PWGPG"
alias pwview="view $PWGPG"
alias rm='rm --verbose --interactive'
alias rmdir='rmdir --verbose'
alias sg='sudo git'
# OS-specific aliases
case $(uname) in
Darwin)
LS_OPTIONS='-FGh'
alias chgrp='chgrp -v'
alias chmod='chmod -v'
alias chown='chown -v'
alias cp='cp -iv'
alias ll="ls $LS_OPTIONS -la"
alias l="ls $LS_OPTIONS -CFA"
alias ln='ln -iv'
alias ls="ls $LS_OPTIONS"
alias mkdir='mkdir -v'
alias mv='mv -iv'
alias rmdir='rmdir -v'
alias rm='rm -iv'
;;
FreeBSD)
LS_OPTIONS='-FGh'
alias chflags='chflags -v'
alias chgrp='chgrp -v'
alias chmod='chmod -v'
alias chown='chown -v'
alias cp='cp -iv'
alias ll="ls $LS_OPTIONS -la"
alias l="ls $LS_OPTIONS -CFA"
alias ln='ln -ivw'
alias ls="ls $LS_OPTIONS"
alias mkdir='mkdir -v'
alias mv='mv -iv'
alias rmdir='rmdir -v'
alias rm='rm -iv'
;;
SunOS)
LS_OPTIONS='-Fh'
alias cp='cp -i'
alias ll="ls $LS_OPTIONS -la"
alias l="ls $LS_OPTIONS -CFA"
alias ls="ls $LS_OPTIONS"
alias mkdir='mkdir'
alias mv='mv -i'
alias rm='rm -i'
unalias chgrp
unalias chmod
unalias chown
unalias chcon
unalias ln
unalias mdstat
unalias rmdir
;;
esac