home *** CD-ROM | disk | FTP | other *** search
/ PDA Software Library / pdasoftwarelib.iso / PSION / UTILS / SHELL3A / README.TXT < prev    next >
Encoding:
Text File  |  1996-09-01  |  13.8 KB  |  336 lines

  1.                     Shell3a V1.70
  2.                     =============
  3.                     
  4.               Copyright (c) Nick Murray 1996
  5.                        
  6.                     
  7. Introduction
  8. ------------
  9.  
  10. Shell3a is a command line shell for the Psion Series 3a which
  11. allows basic file operations such as copy, delete, rename, etc,
  12. as well as more sophisticated operations.
  13.  
  14. Highlights:
  15. <NEW> A 'pipe' like feature allowing the output of one command to
  16.        form the input of another
  17. <NEW> Input redirection
  18. <NEW> Multiple commands per line, separation by ';'
  19.       Command history accessed with the cursor keys
  20.       Support for external, user written, commands
  21.       Access to ROM (rom::) and remote (rem::) filesystems
  22.       Relative pathnames (. ..)
  23.       Wildcards on filenames (e.g. cp *.bat a:\bat)
  24.       Command aliasing 
  25.       Output redirection to a file (e.g. ls > ls.out)
  26.       Shell variables, allowing extensive configuration
  27.       Support for batch files including parameter passing and the
  28.        additional commands IF, GOTO and SHIFT
  29.       Extensive help
  30.       Ability to run .OPA and .APP files (inc. parameters)
  31.       [experimental] Pop-up error log window
  32.       Inline arithmetic evaluation, e.g. echo 1+1 is ${1+1}
  33.       Sophisticated 'path' mechanism
  34.  
  35. Commands: alias, at, banner, bg, cat, cd, chmod, cls, cp, date, df,
  36. (Builtin) echo, edit, exit, goto, hash, history, if, ls, man, mem
  37.           mkdir, more, mv, od, pause, pwd, rename, rescan, rm,
  38.           rmdir, set, shift, unalias, unset, ver, which
  39.  
  40. Supplied as external modules: battery, du, kill, play, ps, setpr
  41. (inc. source and help file)   view, wc
  42.  
  43. More detailed information is contained within the program's help
  44. system. The help system is based on Tom Dolbilin's OPL Help System,
  45. so if you've already installed this you won't need sys$help.opo.
  46.  
  47.  
  48. Installation
  49. ------------
  50.  
  51. 1) Copy SHELL_3A.OPA to \APP on A: B: or the internal disk.
  52.  
  53. 2) Copy AUTOEXEC.BAT to \APP\SHELL3A on the same drive as above,
  54.   or to the root directory, \, on any disk.
  55.  
  56. 3) Install SHELL_3A.OPA onto the desktop using PSION-I.
  57. [the rest of the installation can be performed using the shell and
  58.  is only necessary to use the help and supplied external commands]
  59.  
  60. 4) Create a directory (eg. \BIN) and copy the .OPO files into it.
  61.  
  62. 5) Create a directory (eg. \HLP) and copy the .HLP files into it.
  63.  
  64. 6) Set the 'path' and 'helppath' variables respectively in the
  65.  AUTOEXEC.BAT files to reflect the directories chosen in (4) & (5)
  66.  [ Changing the autoexec.bat file can best be done via the shell
  67.  'edit' command. ]
  68.  
  69. HINT: If you want to keep all the Shell3a files together, use a
  70.       single directory (eg. M:\APP\SHELL3A) for both the .OPO and
  71.       .HLP files.
  72.  
  73. Customisations (usually set in AUTOEXEC.BAT)
  74. --------------
  75. (1) path - This is the list of directories in which the shell will
  76.    look for .BAT, .OPO, .OPA and .APP files. Each time the path is
  77.    searched and a command found, the location is recorded (HASHED).
  78.    This hash table is cleared when the path is changed and can be
  79.    directly manipulated via the 'hash' command. In order for the
  80.    help system to work, SYS$HELP.OPO must be in one of the
  81.    directories of the path.
  82.     eg. set path="loc::m:/opo,loc::m:/bin,loc::m:/app/shell3a"
  83.  
  84. (2) helppath - The directories in which the help files are stored.
  85.    If help is invoked for a command, eg. mycom, that isn't built
  86.    into the shell, a help file 'MYCOM.HLP' is searched for in
  87.    these directories. This allows help to be provided for user
  88.    written commands.
  89.     eg. set helppath="loc::m:/hlp,loc::a:/hlp"
  90.  
  91. (3) Setting path and helppath should allow you to view the online
  92.    help. See the *(v) sections at the end of the online help for
  93.    the remaining shell settings.
  94.  
  95.  
  96. Files included:
  97.  
  98.  \APP\SHELL_3A.OPA - the main application
  99.  \APP\SHELL3A\AUTOEXEC.BAT - a sample start up file
  100.  \APP\SHELL3A\SHELL3A.HLP - the help file
  101.  \APP\SHELL3A\DOS.BAT - Aliases more familiar to MS-DOS users.
  102.  \APP\SHELL3A\BATTERY.OPO - command to display battery status
  103.  \APP\SHELL3A\DU.OPO - show disk usage by directory
  104.  \APP\SHELL3A\KILL.OPO - terminate a process
  105.  \APP\SHELL3A\PLAY.OPO - play a .WVE sound file
  106.  \APP\SHELL3A\PS.OPO - display the running processes
  107.  \APP\SHELL3A\SETPR.OPO - change the priority of a process 
  108.  \APP\SHELL3A\VIEW.OPO - show .PIC files
  109.  \APP\SHELL3A\WC.OPO - count the lines, words and chars. in a file
  110.  \APP\SHELL3A\BATTERY.HLP - help for the above commands
  111.  \APP\SHELL3A\DU.HLP
  112.  \APP\SHELL3A\KILL.HLP
  113.  \APP\SHELL3A\PLAY.HLP
  114.  \APP\SHELL3A\PS.HLP
  115.  \APP\SHELL3A\SETPR.HLP
  116.  \APP\SHELL3A\VIEW.HLP
  117.  \APP\SHELL3A\WC.HLP
  118.  \APP\SHELL3A\HCP.OPO - Tom Dolbilin's OPL Help System
  119.  \APP\SHELL3A\SYS$HELP.OPO - "    "     "   "      "
  120.  README.TXT - this file
  121.  PROGRAM.TXT - a description of how to write external commands
  122.  SRC.ZIP - ZIP file containing the source for the 8 external commands
  123.  
  124.  
  125. New features in this version
  126. ----------------------------
  127.  
  128. 1) Redirection of input into commands
  129.  
  130. Input can be redirected into a command either by using the notation
  131. '< file', e.g. more < file.txt or by PIPING the output of another
  132. command using the '|' notation,  e.g. ls | more
  133.        
  134. Notes: In the example above 'file.txt' should be a text file as it
  135.         is opened in text, rather than binary mode which restricts
  136.         input lines to less than 255 characters.
  137.        Batch files cannot be subject to input/output redirection
  138.        See notes on pipes below
  139.  
  140. 2) Multiple commands on an input line
  141.  
  142. Multiple commands can occur on a single command line. The separator
  143. between commands is ';', e.g date ; pwd
  144.  
  145. Notes: ';' is close to the standard for separation of multiple
  146.         commands within a single command line. As ';' was already
  147.         used to separate pathname components, I have had to change
  148.         the pathname separator to ','.
  149.        If an error occurs in one of the commands the subsequent
  150.         commands are still executed, unless it was an error caught
  151.         in the initial parse of a command (e.g. bad wildcards).
  152.  
  153. 3) Implementation of 'pipes'
  154.  
  155. This allows the output of one command to form the input of another
  156. command, e.g. ls | more
  157.  Commands must be specially coded for this to work. On the output
  158. side, if the shell flags to the command that the output is
  159. redirected, the command should write output to the handle SHout%
  160. using the IOWRITE command. This is automatically handled if fprint
  161. is used to produce the output.
  162.  On the input side, if the shell flags the input is redirected, the
  163. command should read input from the handle SHin% using the IOREAD
  164. command.
  165.  The shell builtins more, od and cat have been modified to accept
  166. redirected input. They were the only commands that already took
  167. input from a file.
  168.  
  169. Notes: The pipe character |, char 179 can be produced within the
  170.         shell by pressing <PSION> +. Otherwise use <CONTROL>179.
  171.        Pipes are implemented by using intermediate files to which
  172.         output is written and read. These files are LOC::M:\|.1
  173.         and LOC::M:\|.2. Data between processes should be text as
  174.         the intermediate files are opened in text not binary mode
  175.         (to make reading them easier!).
  176.        Batch files cannot appear in pipes.
  177.        If a command doesn't accept redirected input the input is
  178.         ignored.
  179.        If a command doesn't produce redirected output the input
  180.         to the next command will be empty, but it will still
  181.         execute. If an error occurs in the pipe, the subsequent
  182.         commands are still executed, albeit with empty input
  183.         (except when it' an error with redirection or wildcards).
  184.        If an alias is used in a pipe, multiple command or input/
  185.         output redirection there MUST be a space between the alias
  186.         and the '|', '>','<' or ';' symbol.
  187.         e.g. alias h history
  188.               Work        Fail
  189.              h | more    h| more
  190.              h |more     h|more
  191.         This isn't a new bug, it exists due to the way aliases are
  192.         detected.
  193.        Within batch files, GOTO commands and labels may behave
  194.        stangely if they are part of multiple command line.
  195.  
  196. 4) A new command to count the number of lines, words and
  197.  characters in a file - wc. This is really just an example of code
  198.  that can use input redirection.
  199.  
  200.  
  201. Changes between V1.70 and V1.60
  202. -------------------------------
  203. - change of separator from ';' to ',' in PATHs
  204. - enhanced the 'man' command to include searching for topics
  205.  and command-line access to any topic
  206. - ability to have AUTOEXEC.BAT file in \APP\SHELL3A directory
  207. - bug fixes for ls (corrupt output on remote drives) and play
  208.  (could crash the machine under certain circumstances)
  209.  
  210.  
  211. New features in V1.60
  212. ---------------------
  213. - Log window. This displays error and information messages that
  214.  previously were displayed on the text screen. Currently these are
  215.  the messages from "rescan" and bad path/helppath component
  216.  warnings. This window is shown during initialization and then
  217.  hidden. The  key toggles the window.
  218.  
  219. - ${expression}. This allows the evaluation (using the OPL EVAL
  220.  construct) of arithmetic expressions. This allows the numeric
  221.  manipulation of shell variables. eg. set i=${$i-1}. This removes
  222.  the need for a separate "EVAL" command.
  223.  
  224. - The path searching has been reworked. In previous versions the
  225.  list of commands found in the directories of the path were stored
  226.  when the path was set and never changed. Although this was fast,
  227.  it meant relative paths couldn't be used (eg. '.') and new files
  228.  weren't automatically found (hence the rehash command).
  229.   The new algorithm searches the path when an unknown command is
  230.  encountered and stores the path if it is found. The "hash" command
  231.  is used to manipulate the hash table.
  232.  
  233. - External command execution. In previous versions, a separate
  234.  command "exec" was needed to run .OPA and non-shell .OPO files.
  235.  This has been reworked and any .BAT, .OPO, .OPA or .APP files can
  236.  be run by typing it's full pathname or just the name if it is in
  237.  a directory in the path. The extension is optional now, and if
  238.  one isn't supplied the search order is BAT, OPO, OPA then APP. If
  239.  "." isn't in your path programs in the current directory can be
  240.  accessed as "./program".
  241.   A single parameter can be supplied to an OPA or APP. Some
  242.  applications EXPECT an argument and will fail without one. Others
  243.  ignore the argument, or perform unusually if one is given!
  244.  A word of warning - some APPs don't like being executed like this.
  245.  For example running ROM::RUNOPL.APP or ROM::RUNIMG.APP causes a
  246.  soft reset! - I've never found out exactly why.
  247.   
  248. Changes between V1.60 and V1.40
  249. -------------------------------
  250. - Back to 1 executable
  251. - Variables are prepended either by $ or % depending on "unixvar"
  252. - Loss of eval, exec and rehash commands; their functionality has
  253.  been moved elsewhere (see new features above).
  254. - Extra commands: mem, banner, battery, view, setpr, du
  255. - Use of the OPL cache
  256.  
  257. New features in V1.40
  258. ---------------------
  259. - The number of commands stored in the history can be set via the
  260.  'set' command
  261. - There is no longer any limit on the number or size of aliases.
  262. - batch files can now take variables which are are accessed using
  263.  %0 .. %9
  264. - Shell variables have been introduced. These are specified as
  265.  %string
  266. - Settings such as path, helppath, etc are implemented as shell
  267.  variables
  268. - new IF command (DOS syntax)
  269. - SHIFT, GOTO and labels in batch files.
  270.  
  271. Changes between V1.40 and V1.23
  272. -------------------------------
  273. - The program now consists of 2 parts, shell3a.opa and commands.opo
  274.  which contains all the user commands.
  275. - As shell variables use the '%' DOS convention, prompt 'variables'
  276.  are now referred as $H and $p rather than %H and %p.
  277.  
  278. New features in V1.23
  279. ---------------------
  280. - Items in the command history are accessed using the up/down
  281.  cursor keys
  282. - The <Help> key brings up the main help menu.
  283. - Support for external modules and hence user-expansion of the
  284.  capabilities of the shell.
  285.  
  286. Changes between V1.23 and V1.02
  287. -------------------------------
  288. - The comment string in .BAT files is now '#'
  289. - The Mac 3-link can now be used. Pathnames and device names with
  290.  spaces have to be quoted, eg. cd "rem::Hard Disk:".
  291. - The path is no longer searched each time a command that doesn't
  292.  match a built-in is found. Instead a list of .OPO of .BAT files
  293.  found in the path is stored and searched. This means external
  294.  .OPO modules are executed with little noticable delay. Members of
  295.  the list are accessed WITHOUT the suffix .BAT or .OPO.
  296. - Separate current directory for each device. Because of this
  297.  all possible devices are scanned when the program starts. If
  298.  devices are added the command 'rescan' must be used to recognize
  299.  the new device. Note the rescan command has the side-effect of
  300.  resetting the current working directory.
  301. - 'df' without arguments show a summary of all devices
  302.  
  303.  
  304. Acknowledgements
  305. ----------------
  306. Psionics files by Clive Feather
  307. Tom Dolbilin for his excellent help system
  308. Suggestions: Chris Dadd
  309.              mike@btwelve.demon.co.uk
  310.  
  311. External Commands
  312. -----------------
  313. If you write any useful external commands that you'd like to make
  314. available to other users, either send me the source or drop me a
  315. note of where it's available, and I'll include this information in
  316. the next release.
  317.  
  318.  
  319. Bugs, suggestions, etc.
  320. -----------------------
  321. I can be reached via email at nmurray@csd.abdn.ac.uk
  322.  
  323.  
  324. Disclaimer
  325. ----------
  326. The author of this software is not responsible for any damage due
  327. to use of this program. This software is provided without warranty
  328. of any kind.
  329.  
  330.  
  331. Copyright
  332. ---------
  333. Last and by no means least, this program is NOT public domain and I
  334. retain the copyright. However provided you don't make money from it
  335. this program is freely distributable.
  336.