home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 488.lha / csh_v5.0 / sample.sh < prev    next >
Text File  |  1991-03-12  |  926b  |  33 lines

  1. # first a few useful aliases
  2.  
  3. al d   "dir -hq"  # hides .info and block lengths
  4. al lst "ls -t"    # sorts by access time
  5. al lsl "ls -l"    # sorts by length
  6.  
  7. # sc searches *.c, even 'sc -c main()' works
  8.  
  9. al sc "%a search @pickopts( $a ) *.c @pickargs( $a )
  10.  
  11. # edf edits a function in Cygnus Ed if the name starts in the first column:
  12.  
  13. al edf "%func set b \"\";search -afl *.c $func | inp b;\
  14.  if $b;split b file line;ed $file;waitforport rexx_ced;\
  15.   inc line 1;rxs rexx_ced \"jump to file \"$file \"jumpto \"$line\" 0\";\
  16.  else;\
  17.   echo Not found;\
  18.  endif
  19.  
  20. # this aliases suppress wild card expansion for certain commands
  21.  
  22. al zoo     "*a Zoo $a
  23. al lharc   "*a Lharc $a
  24. al lz      "*a Lz $a
  25. al newlist "*a Newlist $a
  26.  
  27. # pushd pushes the current directory on a stack
  28. # popd  retrieves it from there
  29.  
  30. set stk ""
  31. al pushd   "set stk $_cwd @subwords( $stk 1 10 );"
  32. al popd    "\\cd @first( $stk );set stk @subwords( $stk 2 10 );"
  33.