Rev 173 | Rev 301 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | dhylands | 1 | ########################################################################### |
2 | # |
||
91 | dhylands | 3 | # 20-aliases.sh |
20 | dhylands | 4 | # |
91 | dhylands | 5 | # Sets up generic aliases for bash |
20 | dhylands | 6 | # |
91 | dhylands | 7 | ########################################################################### |
20 | dhylands | 8 | |
9 | # Enable extended globbing (used by fgrs et al) |
||
10 | |||
11 | shopt -s extglob |
||
12 | |||
13 | alias a='alias' |
||
14 | |||
15 | a dir='ls' |
||
16 | a h='history|tail -24' |
||
17 | a home='cd ~' |
||
18 | |||
19 | a findname='find . ! \( \( -iname "backup" -o -iname "obj" -o -iname "lib" \) -prune \)' |
||
20 | a findsrc='findname \( -iname "*.[ch]" -o -iname "*.[ch]xx" -o -iname "*.[ch]pp" -o -iname "*.cc" -o -iname "*.s" -o -iname "*.asm" \)' |
||
21 | a find_nocyg='find . -xdev ! \( -iname cygwin -prune \)' |
||
22 | |||
23 | function fgrs |
||
24 | { |
||
25 | findsrc -exec grep -F -H -- "$@" '{}' ';' |
||
26 | } |
||
27 | |||
28 | function fgrsi |
||
29 | { |
||
30 | findsrc -exec grep -F -H -i -- "$@" '{}' ';' |
||
31 | } |
||
32 | |||
33 | function grs |
||
34 | { |
||
35 | findsrc -exec grep -H -- "$@" '{}' ';' |
||
36 | } |
||
37 | |||
38 | function grsi |
||
39 | { |
||
40 | findsrc -exec grep -H -i -- "$@" '{}' ';' |
||
41 | } |
||
42 | |||
43 | function egrs |
||
44 | { |
||
45 | findsrc -exec grep -E -H -- "$@" '{}' ';' |
||
46 | } |
||
47 | |||
48 | function egrsi |
||
49 | { |
||
50 | findsrc -exec grep -E -H -i -- "$@" '{}' ';' |
||
51 | } |
||
52 | |||
53 | a bls=/bin/ls |
||
54 | |||
55 | if [ -z "${VSLICKPATH}" ] |
||
56 | then |
||
57 | a ls='ls --color=auto -F' |
||
58 | else |
||
59 | a ls='ls --color=auto -F -C --width=105' |
||
60 | fi |
||
61 | |||
62 | a ll='ls -alG' |
||
63 | a llr='ll -R' |
||
64 | a m='less -r' |
||
65 | a md='mkdir' |
||
66 | a l='less -r' |
||
67 | a rd='rmdir' |
||
68 | a ren='cmd /c ren' |
||
69 | a rehash='hash -r' |
||
70 | a which='type' |
||
71 | a whereis='type' |
||
279 | dhylands | 72 | a open='cygstart' |
20 | dhylands | 73 | |
74 | a sa='. ~/.startup.d/20-aliases.sh' |
||
75 | a sb='. ~/.bashrc' |
||
76 | a se='. ~/.startup.d/01-env.sh' |
||
77 | a sp='. ~/.startup.d/02-path.sh' |
||
78 | a setpath='sp' |
||
79 | |||
80 | a va='vi ~/.startup.d/20-aliases.sh' |
||
81 | a vb='vi ~/.bashrc' |
||
82 | a ve='vi ~/.startup.d/01-env.sh' |
||
83 | a vp='vi ~/.startup.d/02-path.sh' |
||
84 |