home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d1xx / d145 / csh.lha / Csh / README < prev    next >
Text File  |  1988-05-26  |  3KB  |  91 lines

  1. 30-APR-88
  2. Read the warnings below before you try to execute. Needs ARP 1.1.
  3. Here are a couple of nice improvements to csh 2.07M. The new features are:
  4.  
  5.     File name completion.
  6.     Assume that the following files are in the current directory:
  7.         foo.c bar.c bar.o adir
  8.     where adir is a directory. Enter the following partial command
  9.     line to csh
  10.         echo fo
  11.     then hit TAB (the cursor should be immediately after the string "fo").
  12.     csh should now expand this to
  13.         echo foo.c
  14.  
  15.     If you type
  16.         echo b
  17.     and then hit TAB, Csh will expand this to
  18.         echo bar.
  19.     Now try hitting CNTRL-D. Csh should now list
  20.         Directory of your-current-dir
  21.          bar.c bar.o
  22.  
  23.     If you type
  24.         echo ad
  25.     and then hit TAB, you should get
  26.         echo adir/
  27.  
  28.     File name completion is most useful on fast devices, like a ram disk.
  29.  
  30.     Now, as you noticed above csh would not expand b to bar.c because
  31.     there was a file bar.o in the directory. You can tell csh tha it
  32.     should ignore files with certain suffixes. This is done by setting
  33.     the shell variable 'fignore'.
  34.         set fignore .o
  35.     tells csh to ignore files ending in '.o'. 'b' will now expand to
  36.     'bar.c'.
  37.         set fignore .info,.o
  38.     will cause csh to ignore files ending in '.o' and '.info'.
  39.  
  40.     Note: the parsing done on the arguments before the completion is
  41.     very simple minded. The parser does not understand about spaces in
  42.     file names.
  43.     
  44.     Argument execution.
  45.     A string on the command line surrounded by grave accents will be
  46.     executed and the result of the execution will be substituted for
  47.     the the string.
  48.     
  49.     Example:
  50.         I have enclosed a command called sets (sets is the main reason
  51.         that I added the argument execution feature).
  52.         sets * -d *.zoo
  53.         will list all files except those that end with the suffix '.zoo'.
  54.             rm `sets * -d *.zoo`
  55.         will remove all files except those that end in '.zoo'. Neat, huh?
  56.  
  57.     The total size of the command line is currently limited to 256 bytes.
  58.     I consider this to be a very serious restriction.
  59.  
  60.     
  61. Time for some warnings and disclaimers.
  62.  
  63.     I have converted the csh back to Lattice. The source diffs that I have
  64.     provided are what you should need to put these facilities into csh under
  65.     MANX, but you may have to do some editing. I have not tried to compile
  66.     this under MANX but there should not be any serious problems.
  67.  
  68.     I can provide the complete diffs for Lattice if anyone is interested.
  69.  
  70.     The binary that I have provided is intended as a demonstration of how nice
  71.     these features are, to encourage you to put them into other shells,
  72.     including future csh's.
  73.  
  74.     The binary has been generated by the Lattice compiler. I have not done
  75.     a whole lot of testing on it so some bugs may remain. I have used ARP 1.1,
  76.     the binary will not work without it.
  77.  
  78.     A note about
  79.     run
  80.        The binary runs commands by calling SyncRun(). SyncRun() does not
  81.     handle run (the old AmigaDOS BCPL command). However, it does handle
  82.         arun
  83.     I usually copy arun to vd0:c/run.
  84.         copy sys:c/arun vd0:c/run
  85.  
  86.     Another caveat: redirection does not work together with run.
  87.  
  88.  
  89.                     Johan Widen
  90.                 USENET: jw@sics.se
  91.