home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / www / cucug / amiga / amiinfo / reviews / wshell2.txt < prev    next >
Internet Message Format  |  1997-11-07  |  15KB

  1. From: Mike (My Watch Has Windows) Meyer <mwm@Pa.dec.com>
  2. Organization: The Amiga Online Review Column - ed. Jason L. Tibbitts III
  3. Subject: REVIEW: WShell 2.0
  4. Keywords: utility, shell, CLI
  5. Path: menudo.uh.edu
  6. Distribution: world
  7. Newsgroups: comp.sys.amiga.reviews
  8. Followup-To: comp.sys.amiga.applications
  9. Reply-To: Mike (My Watch Has Windows) Meyer <mwm@Pa.dec.com>
  10. Ultrix: Will drive you to drink.
  11. --text follows this line--
  12. With 2.0 now available in ROM, Wishful Thinking Development Corporation
  13. has released a version of WShell designed to work with 2.0 in much the
  14. same way that earlier versions of WShell worked with earlier versions
  15. of AmigaDOS. To quote the manual, "WShell is a command shell designed
  16. as a much-enhanced but highly compatible alternative to the Amigas
  17. built-in Shell."
  18.  
  19.     Alternative?
  20.  
  21. AmigaDOS 2.0 supports the concept of a "user shell", that defaults to
  22. the shell provided in ROM. WShell fully supports those features, and
  23. can be installed as a user shell. It is possible - even simple - to
  24. arrange things so that every shell started is a WShell, and you never
  25. have to type at anything but a WShell. It is also possible to use
  26. WShell as another application that must be started when you wish to
  27. use it, with everything normally going to the ROM shell.
  28.  
  29. In additions, WShell comes with DisplayHandler, a replacement for the
  30. AmigaDOS con: handlers. As with WShell proper, you can either arrange
  31. that everything that opens a con: device (among others) gets a
  32. displayhandler device, or that only programs that specifically request
  33. a displayhandler device get one. WShell can be used with or without
  34. displayhandler.
  35.  
  36.     Compatible?
  37.  
  38. WShell tracks the Commodore ROM shells closely. Even during the test
  39. phases of the ROM version, WShell had new features soon after the ROM
  40. shell had them. In using WShell for nearly three years, through
  41. various versions, I've as yet to encounter a compatibility problem
  42. that can be attributed to WShell.
  43.  
  44. There are, of course, obscure things that can be done that would cause
  45. WShell to behave differently than the ROM shell. After all, it does
  46. add more functionality to the command line. However, even these cases
  47. are tailored so that common usage gets the proper action, and there
  48. are usually switches to turn them off.
  49.  
  50. For example, the "&" character is used in WShell to start a background
  51. task. &'s in quoted arguments aren't recognized. Whether an & in the
  52. middle of a command line terminates a command and causes it to be
  53. started in the background is a user-configurable option. Such things
  54. will be mentioned along with the features in question.
  55.  
  56. In general, if a script works with the ROM shell, it will almost
  57. certainly work with WShell. However, it is easy to write WShell
  58. scripts that will fail if run with the ROM shell.
  59.  
  60.     Enhancements?
  61.  
  62. There are a long list of enhancements that WShell provides the
  63. AmigaDOS user. DisplayHandlers adds more, FComp (a file name
  64. completer) adds even more, and PathHandler adds still more. I'm just
  65. going to list many of them.
  66.  
  67. First, WShell improves how the shell starts. Unlike the AmigaDOS
  68. shells, WShell lets you put many of the things one wants to do for
  69. every shell - typically aliases and options - in the Config-WShell
  70. file that is read when the first WShell starts.
  71.  
  72. To help with controlling aliases, WShell has two different alias
  73. namespaces, "local" and "global". Global aliases are global to all
  74. WShells. Local aliases are only visible to the WShell they were
  75. entered in. All aliases in Config-WShell are global, and aliases other
  76. aliases default to local. This allows you to set up all the aliases
  77. you always want in Config-WShell, and have project-specific aliases in
  78. each WShell.
  79.  
  80. Now, the things that all Unix users tend to ask for - `|' for
  81. anonymous pipes and `&' to run a process in the background. WShell
  82. provides both of those. Further, the two characters are
  83. user-selectable, so you don't have to follow the Unix conventions.  As
  84. mentioned, & may or may not work if used to separate commands,
  85. depending on a user-selectable option. | must be preceded by a space,
  86. to discriminate the pipe usage from the pattern-matching usage.
  87.  
  88. Another feature Unix users will like is that the I/O redirection
  89. characters may appear anywhere on the command line. Further, they have
  90. been enhanced with '<>' to redirect both input and output to a console
  91. device (i.e. "sci <>con:11/0/100/100/Sci-window &" to start a CLI
  92. utility in it's own window). WShell permits you to define the
  93. NOCLOBBER environment variable, which will cause the file redirection
  94. operators to not overwrite existing files. !> or !>> override the
  95. NOCLOBBER variable.
  96.  
  97. As another boon to Unix uses, the character used for escaping other
  98. characters in quoted strings (normally `*') can be changed to whatever
  99. you want, including backslash. Further, unlike the standard AmigaDOS
  100. shell, that escape character can be used to quote some characters
  101. (only <, >, |, &, [, `, ; and *) outside of quoted strings. Since
  102. those are nonsense pairs in AmigaDOS, no ROM Shell scripts should fail
  103. because of this feature.
  104.  
  105. On the other hand, most Unix users will probably be annoyed by the
  106. addition of backticked commands in the 2.0 ROM shell. This is a
  107. feature copied form Unix after Unix has decided the chosen syntax was
  108. a bad idea, and is dropping it. If a portion of a command line is
  109. surrounded by backticks (`), then that portion is sent to the user
  110. shell as a command, and the output of that command replaces the
  111. backticked string in the command line, after all newlines in the
  112. output have been turned into spaces. The 2.0 shell only allows one
  113. backticked command per command line; WShell allows many. The 2.0 shell
  114. does not allow nesting of backticked command (which is why Unix
  115. dropped that syntax).  WShell allows nesting by doubling the backticks
  116. inside the command.  Once again, no scripts meant for the ROM shell
  117. should have troubles with this extension to the 2.0 shell.
  118.  
  119. As a boon to Rexx users, WShell supports Rexx scripts directly. The
  120. extension is "rexx", and the default host is the WShell that started
  121. the script. You can send commands back to the WShell that change it's
  122. state, which isn't possible with the 2.0 ROM shell. The execio command
  123. can be used WShell Rexx macro to directly import the output of
  124. commands into the macro without going through an intermediate file,
  125. and do it noticeably faster than reading the file in with Rexx
  126. I/O.
  127.  
  128. WShell allows those who dislike the implicit CD to turn it off.
  129.  
  130. WShell uses an environment variable to hold a "global path". This is a
  131. list of directories that are locked and searched on each command
  132. search, as opposed to the local path or the ROM shell path, where the
  133. directories are locked when the path is set up, and that lock is
  134. searched on command searches. This means you can use "df1:c" for
  135. common commands, and the disk in drive df1: will be searched, not the
  136. disk that was in drive c when the path was set.
  137.  
  138. On startup, WShell can "take over" an existing shell. This is intended
  139. for startup sequences, but I haven't tried it (I start my initial
  140. WShell via an icon in WBstartup).
  141.  
  142. WShell lets you select the number of consecutive EOF (control-\)
  143. characters you need to use to log out. If this is set large enough,
  144. you get a warning added to the prompt.
  145.  
  146. As with previous versions of WShell, there is a utility that fixes
  147. Execute() to use WShell instead of the ROM shell.
  148.  
  149. WShell includes an extensive set of built-in commands, including
  150. commands for manipulating a stack of directories that you have
  151. visited, and one that runs its standard input as a batch file.
  152.  
  153. Among the most interesting of the builtin commands is the prompt
  154. command. Like its AmigaDOS counterpart, it lets you set the prompt.
  155. However, you can include any of the current directory, the date, time
  156. of day, elapsed time, the current command failure level, the task ID,
  157. available memory - either chip, fast or public, task number, stack
  158. size, and the return code and error codes from the last command.
  159. Further, you can insert commands to be run in either a subshell or the
  160. current shell when the prompt is generated, and environment variables
  161. can be expanded. You also get to change text colors inside the prompt,
  162. should you wish to.
  163.  
  164. Finally, there's potentially much information, and you may not feel
  165. you have enough room in your prompt string for everything you want,
  166. the env:titlebar variable can be set to put this information in the
  167. screen titlebar after commands. You can get the original window
  168. titlebar into your prompt if you need that.
  169.  
  170.  
  171.     DisplayHandler.
  172.  
  173. DisplayHandler is a replacement for the console handler supplied with
  174. AmigaDOS. It can be used solely with WShell, or with any program that
  175. opens a CON: window. It allows menus to be attached to device names,
  176. which can be used to insert commands into the window. It supports the
  177. 2.0 CON: switches, and a selection of others as well.
  178.  
  179. The most interesting new feature of DisplayHandler is the "session
  180. history". This is the text output to the window. If a device has
  181. session history enabled, then each window will have a scroll bar for
  182. scrolling through the session history. The session history can be
  183. logged to a file for later perusal.
  184.  
  185. Session history should not be confused with command history, which is
  186. a list of commands entered into the window. DisplayHandler provides
  187. this facility as well. It is similar to the command history provided
  188. by the AmigaDOS shell, with some enhancements. Most notable are the
  189. ability to control search wraparound, the length of the short line
  190. that will be added to the history list, and whether unmodified
  191. commands will be added to the list.
  192.  
  193. Other option allow specifying a window/screen to use, borderless
  194. windows, simple or smart refresh windows, forcing the screen it opens
  195. on to the front, opening inactive, controlling propagation of break
  196. characters, pen colors, font and size and keymap used by the window.
  197.  
  198. Using menus is straightforward. When a DisplayHandler device is
  199. mounted, a menu can be added to all windows that open using that
  200. by providing the name of a menu description file to the "MENU"
  201. keyword. The menu file allows you to specify menu entries (or submenu
  202. entries), including separator bars, and the text that is inserted into
  203. the input stream when they are selected. This allows you to put common
  204. commands in the menu, complete with Right-Amiga keyboard shortcuts.
  205.  
  206. The line/history editing facilities are compatible with, and more
  207. extensive than, the similar AmigaDOS facilities. Deleting
  208. forwards/backwards by words, by chars and by path elements (a "name")
  209. are all possible. Cutting text from one history line and inserting it
  210. in another is possible.
  211.  
  212.     FComp.
  213.  
  214. FComp was intended to be a filename completion facility. Users of
  215. other operating systems may recognize this, as in its raw form it
  216. works as other such facilities - you type a partial file name, and hit
  217. the appropriate magic character, and extra text is added to the line
  218. to complete the file name, or part of it. If the file name isn't
  219. unique, it beeps at you, and you hit the magic character again to
  220. cycle through the possible completions.
  221.  
  222. However, FComp carries this much further than other such facilities
  223. I've seen. You can control how completion is done - the string
  224. displayed when a completion or partial completion happens, and
  225. a "search path" to be checked for files. This control can be done
  226. based on the completion key used or the command being entered. The
  227. shell and FComp cooperate so that completions that will be read by a
  228. running command use the rules for that command. For example, I have
  229. FComp configured so that doing filename completion for names to be
  230. used by a LISP interpreter look in source:lisp as well as the current
  231. directory.
  232.  
  233. Since it's already got hooks into the input stream, FComp also
  234. provides a keymap facility. This can be used to provide "hotkeys" for
  235. various things, or to change the actions of keys to something you
  236. prefer. For example, I use FComp to create an Emacs-like editing
  237. environment, and to let me use the arrow keys to control scroll
  238. through the session history as well as the command history.
  239.  
  240. Finally, FComp registers the windows it is dealing with as AppWindows,
  241. so you can drop icons into a WShell window and have various actions
  242. taken on them. The WSHAPP tooltype specifies a string to be inserted -
  243. with some substitutions - into the input stream for a window when the
  244. icon is dropped on the window.  The FILETYPE tooltype causes FComp to
  245. check for a string for the named filetype, so that you could cause all
  246. files of type ILBM to have "view" run on them if they are dropped on a
  247. WShell. If neither is specified, the name of the icon is inserted into
  248. the input stream.
  249.  
  250. To make sure things don't get to slow, FComp runs asynchronously. If
  251. you decide you know the name and don't want to wait for a directory
  252. scan, you can type more characters. FComp won't insert text in that
  253. case. FComp also caches directory entries so that searches don't have
  254. to happen often. The user is given much control over that cache to
  255. trade off performance vs. memory use, but I've found the defaults work
  256. rather well.
  257.  
  258.  
  259.     PathHandler.
  260.  
  261. PathHandler is a device driver that provides the same functionality as
  262. the multiple assigns in 2.0, on (as usual) with more facilities thrown
  263. in.
  264.  
  265. A pathhandler path takes the form path:dir1,dir2,dir3 where the dir?s
  266. may be arbitrary AmigaDOS directories, including other path:
  267. directories. An alias facility exists so that long path lists can be
  268. referenced by a short name. The device tao: can be listed to see what
  269. paths and aliases are currently defined.
  270.  
  271. The protection attributes on the directories in a pathhandler path can
  272. be used as expected. If a directory would disallow the action being
  273. attempted, that directory will be skipped during the search. The
  274. meaning of the E bit is changed slightly. If it is off, then a list
  275. operation on that directory will get back only the directory name, not
  276. the files contained in it. These attributes are those of the
  277. pathhandler entries, not the directories themselves. This allows for
  278. creating different versions of a path with different protections.
  279.  
  280.  
  281.     Summary.
  282.  
  283. I'm a convert. My Amiga would be much less useful, and I would be
  284. much less productive, without the features and abilities that WShell
  285. brings to the Amiga. Other have said that various features are "worth
  286. the purchase price by themselves." I can only concur. The cost of
  287. WShell is low enough that I'd be willing to pay that for part of the
  288. functionality it provides. That all these pieces come in the package
  289. for one low price makes it an incredible bargain.
  290.  
  291.  
  292.     Administrative Details.
  293.  
  294. For the record, WShell 2.0 is hard drive installable, has no copy
  295. protection, and works with 1.3, 2.0, accelerated processors, and the
  296. Amiga 3000.
  297. ---
  298. Es brillig war. Die schlichte Toven            Mike Meyer
  299. Wirrten und wimmelten in Waben;                mwm@pa.dec.com
  300. Und aller-mumsige Burggoven                decwrl!mwm
  301. Die mohmem Rath' ausgraben.
  302.