Subversion Repositories Projects

Rev

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
 
301 dhylands 13
alias  dir='ls'
14
alias  h='history|tail -24'
15
alias  home='cd ~'
20 dhylands 16
 
301 dhylands 17
alias  findname='find . ! \( \( -iname "backup" -o -iname "obj" -o -iname "lib" \) -prune \)'
18
alias  findsrc='findname \( -iname "*.[ch]" -o -iname "*.[ch]xx" -o -iname "*.[ch]pp" -o -iname "*.cc" -o -iname "*.s" -o -iname "*.asm" \)'
19
alias  find_nocyg='find . -xdev ! \( -iname cygwin -prune \)'
20 dhylands 20
 
21
function fgrs
22
{
23
   findsrc -exec grep -F -H -- "$@" '{}' ';'
24
}
25
 
26
function fgrsi
27
{
28
   findsrc -exec grep -F -H -i -- "$@" '{}' ';'
29
}
30
 
31
function grs
32
{
33
   findsrc -exec grep -H -- "$@" '{}' ';'
34
}
35
 
36
function grsi
37
{
38
   findsrc -exec grep -H -i -- "$@" '{}' ';'
39
}
40
 
41
function egrs
42
{
43
   findsrc -exec grep -E -H -- "$@" '{}' ';'
44
}
45
 
46
function egrsi
47
{
48
   findsrc -exec grep -E -H -i -- "$@" '{}' ';'
49
}
50
 
301 dhylands 51
alias  bls=/bin/ls
20 dhylands 52
 
53
if [ -z "${VSLICKPATH}" ]
54
then
301 dhylands 55
   alias  ls='ls --color=auto -F'
20 dhylands 56
else
301 dhylands 57
   alias  ls='ls --color=auto -F -C --width=105'
20 dhylands 58
fi
59
 
301 dhylands 60
alias  ll='ls -alG'
61
alias  llr='ll -R'
62
alias  m='less -r'
63
alias  md='mkdir'
64
alias  l='less -r'
65
alias  rd='rmdir'
66
alias  ren='cmd /c ren'
67
alias  rehash='hash -r'
68
alias  which='type'
69
alias  whereis='type'
70
alias  open='cygstart'
20 dhylands 71
 
301 dhylands 72
alias  sa='. ~/.startup.d/20-aliases.sh'
73
alias  sb='. ~/.bashrc'
74
alias  se='. ~/.startup.d/01-env.sh'
75
alias  sp='. ~/.startup.d/02-path.sh'
76
alias  setpath='sp'
20 dhylands 77
 
301 dhylands 78
alias  va='vi ~/.startup.d/20-aliases.sh'
79
alias  vb='vi ~/.bashrc'
80
alias  ve='vi ~/.startup.d/01-env.sh'
81
alias  vp='vi ~/.startup.d/02-path.sh'
20 dhylands 82