home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 2: PC / frozenfish_august_1995.bin / bbs / d08xx / d0888.lha / CFN / ReadMe < prev    next >
Text File  |  1993-07-16  |  4KB  |  154 lines

  1.  
  2.      CFN
  3.     -----
  4.  
  5.  
  6. (Complete FileName !)
  7.  
  8.  
  9. author:   Andreas Gⁿnther
  10. date:     21-june-1993
  11. version:  1.0
  12.  
  13. requires OS 2.0 or higher !
  14.  
  15.  
  16. CFN is public domain. Do with it whatever you want. I am not taking any
  17. responsibility for the program, you are using CFN at YOUR OWN RISK !
  18.  
  19.  
  20.  
  21.  
  22. What is CFN ?
  23. -------------
  24.  
  25. CFN takes a lot of typing from you, when you are working in the Shell
  26. and have to type long file- or directorynames. It's enough to type the
  27. first few characters of the name and to press the TAB key. CFN completes
  28. the filename immediately, but just as long as there is just one
  29. possibility. Let's have a look at an example:
  30.  
  31. Say, you have a directory with the following files:
  32.  
  33. contents.doc
  34. MegaProgrammiximo.readme
  35. MegaProgrammiximo.c
  36. MegaProgrammiximo
  37. MegaProgrammiximoPictures/ superpicture1    [ <-- subdirectory ]
  38.                           superpicture2
  39.  
  40. Now, you want to read the ...readme file (that is what it is for :)
  41. Assuming, you are in the Shell, simply type:
  42.  
  43. > more M
  44.  
  45. and press the "TAB"-key.
  46. The result:
  47.  
  48. > more MegaProgrammiximo
  49.  
  50. as there is only one possibility to complete the name so far.
  51. Now, type ".r" and press the TAB key again:
  52.  
  53. > more MegaProgrammiximo.readme
  54.  
  55. Simply press RETURN and you're ready !
  56.  
  57.  
  58. The whole thing also works with directories, e.g.:
  59.  
  60. > show M                     <TAB-key>
  61. > show MegaProgrammiximo
  62. > show MegaProgrammiximoP    <TAB-key>
  63. > show MegaProgrammiximoPictures/
  64. > show MegaProgrammiximoPictures/s  <TAB-key>
  65. > show MegaProgrammiximoPictures/superpicture
  66. > show MegaProgrammiximoPictures/superpicture1   <RETURN>
  67.  
  68.  
  69.  
  70. History
  71. -------
  72.  
  73. This method to complete filenames is common in UNIX-shells. As you get
  74. accustomed to it very quickly, I often hit the TAB key on my AMIGA
  75. at home without any effect (apart from the inverted "I")...
  76. So I looked for a program that adds this feature to the AmigaShell,
  77. but couldn't find one. I guess, something like that exists, but I'll
  78. find it tomorrow (according to Murphy) ;-)
  79. Well, then I spent one night at my AMIGA and wrote CFN myself. To 
  80. include the filename completion into the system in a clean way, you 
  81. normally had to put very much effort in it (program a new Shell).
  82. But with some tricks, you get it working with just two little programs.
  83.  
  84. Perhaps, someone wants to improve or rewrite the program or have
  85. other good ideas (e.g. making a commodity out of it) .?
  86. For interested programmers, I have included the sourcecode.
  87. (I use CFN with Kickstart 39.106, Workbench 39.29)
  88.  
  89.  
  90.  
  91. Restrictions
  92. ------------
  93.  
  94. A filename have to be typed without any interruptions to be recognized
  95. by CFN. In other words, if you type half of the name, doing some
  96. business in another window and then type the remaining part, CFN will
  97. not be able to complete the name correctly. But as you normally stay
  98. in one window while typing a filename, that's not too bad... It may hit
  99. you worse, that you are not able to edit the typed name with the cursor
  100. keys, but only with the backspace key. (You CAN of course edit it,
  101. but the trick with the TAB key does not work in that case !)
  102. BTW: Filenames that end with ".info", are ignored.
  103.  
  104. As the Shell stays the same and keeps ALL its functions, CFN is
  105. nevertheless a wonderful supplement for the Shell.
  106.  
  107.  
  108.  
  109. Installation
  110. ------------
  111.  
  112. Finally, let's start !
  113. The installation is simple:
  114.  
  115. insert the line
  116.  
  117.     cfn_newshell
  118.  
  119. into your file
  120.  
  121.   S:Shell-Startup
  122.  
  123. and the line
  124.  
  125.     run >NIL: cfn
  126.  
  127. into your file
  128.  
  129.   S:User-Startup
  130.  
  131.  
  132. The programs "cfn" and "cfn_newshell" should stay in your path, e.g.
  133. in the "C:"-directory.
  134.  
  135.  
  136. That's all.
  137.  
  138.  
  139. -------------------------------------------------------------------------
  140.  
  141.  
  142. And now, happy TABbing !
  143.  
  144.  
  145.                   Andreas
  146.  
  147.  
  148. my address:
  149.  
  150. Andreas Gⁿnther               Tel.:  05251/63412
  151. Alfener Weg 10                email: guenther@uni-paderborn.de
  152. D-33100 Paderborn
  153. Germany
  154.