home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 509.lha / CShell_v5.13 / sample.sh < prev    next >
Encoding:
Text File  |  1991-05-07  |  1.1 KB  |  34 lines

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