.tcshrc 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. #
  2. # CSH preferences
  3. #
  4. if ($?prompt) then
  5. set history=100 # Save history of 100 commands
  6. set filec # enable file completion
  7. umask 022 # default protection for new files
  8. #set notify # notify when new mail arrives
  9. #limit coredumpsize 0 # disable creation of core dumps
  10. # set autologout = (120 15)
  11. set prompt="%T %m:%~%# "
  12. alias setprompt 'set prompt="%T %m:%~%# "'
  13. setprompt
  14. endif
  15. #
  16. # Set some reasonable prompt including time-of-day, machine name & dir
  17. #
  18. #
  19. # define some useful path hacking aliases
  20. #
  21. # addpath /foo - add /foo to the end of the search list IFF it exists
  22. # delpath /foo - remove /foo from the path list if it is in list
  23. # prependpath /foo - prepend /foo to the path list
  24. # firstpath /foo - add /foo at head of path list IFF it exists
  25. # move if already in list
  26. # lastpath /foo - add /foo at end of path list;
  27. # move if already in list
  28. #
  29. #
  30. alias addpath 'set nonomatch ; if (! (" $path " =~ *\ \!^\ *) && -d \!^) set path = ($path \!^) ; unset nonomatch' # Add a path
  31. alias delpath 'set path = (`echo " $path " | sed -e "s# \!^ # #g"`)' # delete a path
  32. alias prependpath 'set nonomatch ; if (! (" $path " =~ *\ \!^\ *) && -d \!^) set path = (\!^ $path) ; unset nonomatch' # Prepend a path
  33. alias firstpath 'delpath \!^ ; prependpath \!^' # move to front
  34. alias lastpath 'delpath \!^ ; addpath \!^' # move to end
  35. # YOUR CHANGES GO BELOW THIS LINE. DO NOT REMOVE OR EDIT THIS LINE.
  36. #
  37. # Your favorite aliases go here.
  38. #
  39. alias cd 'pushd \!* > /dev/null; setprompt;'
  40. alias clear
  41. alias del rm -i
  42. alias dirs 'dirs | sed '"'"'s/ $//'"'"' | tr " " "\012"'
  43. alias rm rm -i
  44. #
  45. # general purpose aliases
  46. #
  47. alias from /home/gjones/bin/from
  48. #alias from 'grep "^From " /var/spool/mail/gjones'
  49. #alias emacs xemacs
  50. alias eg 'printenv | grep -i '
  51. alias ls ls --color
  52. alias llt ls -lt --color
  53. alias lltm 'ls --color -lt | more'
  54. alias llth 'ls --color -lt | head'
  55. alias lpr lpr -h
  56. alias lss 'ls --color -1s | sort -nr'
  57. alias lssr 'find . -print | perl -ne '"'"'chop; @foo = lstat $_; print "$_ $foo[7]\n";'"'"' | sort -nr +1'
  58. alias pod 'popd > /tmp/popd.$$ ; cat /tmp/popd.$$ | sed '"'"'s/ $//'"'"' | tr " " "\012" ; rm /tmp/popd.$$; setprompt'
  59. alias path 'echo $path | perl -ne "s/ /\n/g; print;"'
  60. alias ppd "pud;pod"
  61. alias psg '/bin/ps -auxww | grep '
  62. alias purge 'find ~ \( -name "#*" -o -name "*~" -o -name ".*~" -o -name "*"\$ -o -name core \) -print -exec /bin/rm -f "{}" \; '
  63. alias pud 'pushd \!* > /tmp/pushd.$$ ; cat /tmp/pushd.$$ | sed '"'"'s/ $//'"'"' | tr " " "\012" ; rm /tmp/pushd.$$; setprompt'
  64. alias su su -m
  65. #
  66. # Add some of my favorite paths
  67. #
  68. #
  69. # order paths
  70. #
  71. firstpath /home/gjones/tct-beta/bin
  72. firstpath /home/gjones/Office51/bin
  73. firstpath /usr/games
  74. firstpath /usr/mh/bin
  75. firstpath /usr/contrib/bin
  76. firstpath /usr/X11/bin
  77. firstpath /usr/ucb
  78. firstpath /usr/sbin
  79. firstpath /usr/bin
  80. firstpath /sbin
  81. firstpath /bin
  82. firstpath /usr/local/bin
  83. firstpath /usr/local/bin # This is hear twice because
  84. # delpath does not deal with
  85. # having two copies of the
  86. # same path at the end of the
  87. # path
  88. firstpath ~/scripts
  89. firstpath ~/bin
  90. firstpath .
  91. #limit cpu 600
  92. #touch .tcshrc-ran
  93. ~/bin/sig.pl | tee ~/.sig