home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / newc_dev / dc26.lha / dc.man < prev   
Text File  |  1992-12-20  |  6KB  |  162 lines

  1. NAME
  2.     DC - Direct Change V2.6
  3.  
  4.  
  5. SYNOPSIS
  6.     DC <patterns> [-b] [-q] [-e] [-i] [-r]
  7.     DC <devs/...> -u [-q]
  8.  
  9.  
  10. DESCRIPTION
  11.     DC changes the current directory like CD does, but requires only a
  12.     tiny piece of the directory path as a parameter. DC looks for a match
  13.     in a database of the directory paths in your system, and changes
  14.     the current dir directly to that path. Thus, navigating your shell
  15.     through large directory trees becomes fast and convenient.
  16.  
  17.     For instance, typing "CD WORK:Program/Source/MyTools" reduces to
  18.     "DC w:sou/my" or even a "DC myt" assuming the pattern "myt" doesn't
  19.     occur elsewhere. If it does, you can cycle through these multiple
  20.     matches until you've found the directory you are looking for. This
  21.     is done simply by rerunning DC using the same pattern.
  22.  
  23.  
  24. INSTALLATION
  25.     DC requires WorkBench 2.0 or higher. The database containing the
  26.     directory paths can be updated by typing "DC <list of volumes> -u".
  27.     The directory trees of all specified volumes will be stored in
  28.     the file ".dc". "Devs:" is the default location for this file, if you
  29.     prefer another location you'll have to set the environment variable "DC"
  30.     to the path of your choice.
  31.     Updating the database should be done regulary so as to have it reflect
  32.     recent changes in your directory trees. If you use a Cron scheduler,
  33.     I suggest you add the update entry to your CronTab.
  34.  
  35.     Once the database has been created you're ready to go, in principle,
  36.     but every time you invoke DC it will load the .dc file from disk.
  37.     To greatly speed up operations you may wish to install the .dc file
  38.     in RAM as a semaphore by adding "DC -i" to your startup sequence.
  39.     DC is pure and can be made resident for added performance.
  40.  
  41.     Before I forget, as an added bonus, you may compress the .dc
  42.     file using FImp. FImp is a compression utility from the Imploder 4.0
  43.     distribution.
  44.  
  45.  
  46. MATCHING ALGORITHM
  47.     Operation is as follows. The first thing that happens when you use
  48.     DC with a directory name or part of a directory name is a normal
  49.     CD operation. DC tries to lock the directory and if it succeeds
  50.     changes the current directory accordingly. If it fails, DC examines
  51.     the current directory name and if it matches the supplied pattern
  52.     it will change to the next directory matching this pattern.
  53.     So multiple invocations of "DC s" will cycle you through all
  54.     (sub)directories containing a character "s". When the supplied
  55.     pattern is not matching with the current directory DC tries to
  56.     `guess' what the best match will be and jumps to this directory.
  57.     DC is not case-sensitive.
  58.  
  59.  
  60. OPTIONS
  61.     <patterns>    :consists of a partial directory name, no wildcards
  62.              supported (yet).
  63.     -b        :used in conjunction with <pattern> to
  64.              jump to the best matching directory.
  65.     <devs/...>    :consists of a list of devices and/or volumes separated
  66.              by space or comma.
  67.     -u        :used in conjunction with <devs/...> to update the
  68.              directory cache file. May take a while...
  69.     -i        :installs directory cache in public memory.
  70.     -r        :removes directory cache from memory.
  71.     -q        :quiet flag, to disable some default messages.
  72.     -e        :echo's result to the standard output instead of
  73.              changing the current directory. Used in conjunction
  74.              with pipes and command line substitution.
  75.  
  76. EXAMPLES
  77.  
  78.     DC WB_2.0: WORK: -u    :creates database file ".dc" for
  79.                  volumes WB_2.0: and WORK:
  80.  
  81.     DC -i -q        :places directory cache resident in memory
  82.  
  83.     DC system        :will take you to _a_ ...:.../.../#?system#?
  84.                  directory, if one exists e.g. WB_2.0:System
  85.  
  86.     DC vs/pr        :takes you to _a_ ...:.../#?vs#?/.../#?pr#?
  87.                  directory, upto 16 partial pattern separated
  88.                  by a / or : are allowed
  89.  
  90.     DC -r            :removes directory cache from memory
  91.  
  92.     Your (daily) update scheme, worst case, may look like this:
  93.     DC WB_2.0: WORK: "RAM DISK:" -u  : update directory database
  94.     Sort DEVS:.dc TO DEVS:.dc        : depends on personal preferences
  95.     FImp DEVS:.dc DEVS:.dc           : to save a few bytes
  96.  
  97.  
  98. WSHELL 2.0
  99.     WShell 2.0 users have complained that the prompt or shell titlebar
  100.     current directory strings won't be updated after a directory change
  101.     using DC (or any other external program for that matter). To amend
  102.     this, the following work-around has been contrived; in Config-WShell
  103.     add the lines
  104.         alias DC LITERAL cd "`DCR -e []`"
  105.         resi C:DC as DCR
  106.     This has the added benefit that AUTO PUSHCD will still work with DC
  107.     as well as adding wildcarding normal CDs using DC.
  108.  
  109.  
  110. BUGS
  111.     Directory cache format is not very efficient. On the other hand,
  112.     it's readable and editable.
  113.  
  114.     Links are not supported. Due to problems with cycling through
  115.     all directories containing the specified pattern. During update
  116.     any encountered hard- or softlink will be intentionally left out!
  117.  
  118.  
  119. FUTURE IMPROVEMENTS
  120.     Only(?) 16 volumes can be specified on the command line,
  121.     but this can easily be overcome by concatenating different
  122.     .dc files.
  123.  
  124.     Support for some kind of directory-exclusion.
  125.  
  126.     Should use ExAll().
  127.  
  128.     Reformat .dc file to be both efficient and fast.
  129.  
  130.     Add support for local .dc files (ie. one per drive/partition)?
  131.         (In fact this is already possible using a work-around, set
  132.         the env var DC to ":", cd to each volume, use "dc -u" for
  133.         each volume to build local .dc files. There's one drawback: You
  134.         can't place the database in memory, by using "DC -i", anymore.)
  135.  
  136.     How about adding wedges, delete() and makedir() for auto-updating?
  137.  
  138. LEGAL STUFF
  139.     DC is FreeWare. Period. If you like DC and you've some suggestions,
  140.     comments, bugreports, or whatever please send 'em to me by e-mail.
  141.  
  142.  
  143. HISTORY
  144.     ...    lots of beta test versions, lost history.
  145.      2.0    1.3 hacks removed, Workbench 2.0 only now
  146.     2.1    added multiple subpattern support
  147.     2.2    fixed (another) directory priority bug
  148.     2.3    cleaned up for first public release...
  149.     2.4    ignores directory links to avoid problems with cycling
  150.     2.5    translates device_or_assign: to volume:dir/dir/...
  151.         - this avoids problems with cycling (again)
  152.         - this allows constructs like: DC SYS:pat
  153.         (thanks to Mattias Moltkesson for his suggestions)
  154.     2.6    automatic replacement of dirs after an update now
  155.         works again. Wrong version checking fixed.
  156.         Added env var "dc" which may be used to specify another
  157.         path for dc's database. (Default: "DEVS:.dc")
  158.  
  159. AUTHOR
  160.     Peter Struijk
  161.     struijk@dutiws.twi.tudelft.nl
  162.