

  ShellBom v1.1
  -------------


  ShellBom  is  a  small  command  line  shell  for  MS-DOS  and compatible
operating  systems  (including  Windows)  that  includes  some  very useful
features  previously  not  found  in  the standard DOS shell.  It has three
modes  of  filename  and  command  completion  (tab expansion) and built-in
DosKey-like  features,  like enhanced line editing and command history with
search.   ShellBom  features  were inspired by Bash and KingCon.  Bash is a
very  powerful  unix shell made by Brian Fox and Chet Ramey and copyrighted
by Free Software Foundation.  KingCon is a console handler for AmigaOS made
by  David  Larsson that adds filename completion and other nice features to
the  standard  Amiga  Shell.   ShellBom  was  written  to  make  MS-DOS and
compatible OSes a bit less painful to use.
  ShellBom is Freeware.  You can freely use it without any restrictions and
also freely distribute it in any way, without contacting me first.
  ShellBom  is not a replacement for command.com or any other DOS file.  It
is  a  standard  DOS  program  that  uses  command.com (or equivalent) when
executing  programs.   When  running,  ShellBom will use about 40Kb of your
conventional  memory.   To install ShellBom under MS-DOS, you can just copy
it  to  a  directory  in  your  path  and  add  it to the last line of your
autoexec.bat  file,  passing  it  the  needed  arguments.   To use it under
Windows,  install  it  as you would install any standard DOS program to run
under  Windows.   Just  make sure you have set it to run in a window and to
close  the window once the program has finished.  To exit from ShellBom use
the 'exit' command or press Alt+F4.



ShellBom features:
------------------

Advanced line editing:

  ShellBom has internal line editing features similar to the features added
by  DosKey.   ShellBom  doesn't  need  DosKey  neither makes any use of it.
ShellBom  also  has  a command history.  The command history is buffer that
holds  the  last  command lines typed.  You can browse the buffer recalling
those  lines  or  use  the  search  feature  to  find  a  line matching the
characters you typed.

List of control keys:

  BackSpace : Delete the caracter preceding the current cursor position

  Delete : Delete the caracter following the current cursor position

  Insert : Toggle Insert/Overwrite mode

  Left Arrow : Move the cursor one position to the left

  Right Arrow : Move the cursor one position to the right

  Alt+Left Arrow : Move the cursor to the beginning of the previous word

  Alt+Right Arrow : Move the cursor to the beginning of the next word

  Home or Shift+Left Arrow : Move the cursor to the start of the current
command line

  End or Shift+Right Arrow : Move the cursor to the end of the current
command line

  Up Arrow : Recall the previous command line from the command history

  Down Arrow : Recall the next command line from the command history

  PageUp : Go to the start of the command history, recalling the oldest
command line available

  PageDown or Shift+Down Arrow : Go to the end of the command history,
and start editing an empty line

  Shift+Up Arrow or F8 :  Recall the previous command line from the command
history  that  matches the characters from the start of the current command
line to the current cursor position

  F3 :  Go to the end of the command history and recalls the newest command
line available

  Ctrl+BackSpace  or Shift+BackSpace :  Erase all characters of the current
command  line,  ranging  from  the  start of the line to the current cursor
position

  Ctrl+Delete  or  Shift+Delete  :   Erase  all  characters  of the current
command line, ranging from the current cursor position to the end of line

  Esc or Crtl+Y : Erase all characters from the current command line

  TAB : Complete filename. See below.

  Alt+F1 : Use filename completion mode 1

  Alt+F2 : Use filename completion mode 2

  Alt+F3 : Use filename completion mode 3

  Alt+F7 : Clear command history buffer

  Return : Execute the current command line and puts it into the command
history

  Alt+F4 or Ctrl+F4: Exit from ShellBom



File / command name completion:

  The  most useful feature of ShellBom is filename completion.  It is a way
to  save you from typing long file names and avoiding most typing mistakes,
making using DOS faster and easier.  The completion function is assigned to
the  TAB key.  When you are using ShellBom and you want to type the name of
a file or directory, you can type some of the first letters of the filename
and  then  press  the  TAB  key.   ShellBom  will  then  search the current
directory  for  files  matching the typed characters.  If there is a single
matching  filename, it will be added to the current command line, replacing
the  characters  you typed.  If there is no matching filename, nothing will
be done.  If there are several filenames matching the characters you typed,
ShellBom  will  by  default  (unless  you  use  the  /I  switch) expand the
caracters  you  have typed to the caracters common to all matched filenames
and  wait  for  the next keystroke.  Then, if you press TAB again, ShellBom
will  use  one of the three completion modes available, depending of the /M
switch.  If the name you are typing is a command name, ShellBom will search
for  all  directories  in  your  path  (unless  you  use the /S switch) for
executable  files  matching the typed characters.  Internal MS-DOS commands
will not be matched.  If the name you were typing was preceded by the CD or
RD  commands,  only  directories  will  be matched.  The completion feature
found  in  the  current version of ShellBom does not support Windows9x long
filenames and will use the shorter equivalents.

Completion modes :

  Mode 1:  It is the default completion mode and can be also selected using
the  /M  1  option.   In  this mode, when you press the TAB key and several
files  are  matched,  ShellBom  will  only  print  a  list  of the matching
filenames  to the screen.  Then you can continue typing other characters of
the  file  you  want  and  press TAB again, if needed.  This is the default
completion mode of the Bash shell.

  Mode  2:  This mode can be selected using the /M 2 option.  In this mode,
when  you press TAB, ShellBom will replace the characters used for matching
by  the  first  matched filename.  Then, if you press TAB again, it will be
replaced  by  the next matched filename and so on.  If you press Shift+TAB,
it  will  be  replaced  by the previous matched filename.  If you press any
other  key,  ShellBom  will  finish the completion function and resume line
editing.

  Mode  3:  This mode can be selected using the /M 3 option.  In this mode,
when  you  press  TAB,  ShellBom  will open a window displaying the list of
matched  files  and directories, where you will be able to browse using the
Up/Down  or  TAB/Shift+TAB  keys.   Pressing  Space will toggle between the
start of the listing of files or directories.  PageUp/PageDown will jump to
the start or end of the list.  Once you have selected the file or directory
you  want, you can press Return.  Then ShellBom will replace the characters
used  for matching by the filename you selected.  If you press the ESC key,
ShellBom  will  cancel  the filename completion operation.  This is usually
the best mode.




  If you execute ShellBom without passing it any arguments, it will use its
default  options.  The default options can be redefined in the SBOMDEFAULTS
environment variable.  When executing ShellBom, you can use the / character
followed  by  a  letter  to set a switch.  Switches are not case sensitive.
You can use the /?  or /H switches to show an usage message, with a list of
the available options.  The other available switches are the following:

  /O  :   Makes  overwrite mode the default line editing mode for ShellBom.
Without  this  switch the default editing mode will be Insert.  This switch
can also be set in the SBOMDEFAULTS environment variable, and disabled with
/-O.

  /S  :   By default, when trying to complete a command name, ShellBom will
search  for  programs  in  all  the  directories  indicated  by  your  PATH
environment  variable,  and also in the current directory.  If you use this
switch,  only  the current directory will be scanned.  This switch can also
be set in the SBOMDEFAULTS environment variable, and disabled with /-S.

  /M  n  :   Uses filename completion mode n .  'n' can be 1, 2 or 3.  This
switch can also be set in the SBOMDEFAULTS environment variable.

  /I   :    Immediate  completion.   By  default,  when  matching  multiple
filenames,  ShellBom  will  expand the characters used for the match to the
characters  common  to  all  matched  filenames, and then wait for the next
keystroke, unless the characters used for matching are exactly equal to the
characters common to all matched filenames.  Then, if the next key is a TAB
key, it will use the method set by the /M switch to select the wanted file.
If  you  use  the  /I  switch, ShellBom will not wait for another keystroke
before using the completion function set by the /M switch.  This switch can
also  be  set  in  the SBOMDEFAULTS environment variable, and disabled with
/-I.

  /L  n :  Sets the maximum number of lines used in the command history.  n
can  be  any number from 1 to 1000.  By default, the command history uses a
maximum  of  100  lines.   This  switch can also be set in the SBOMDEFAULTS
environment variable.

  /P  :   Makes  ShellBom  "permanent".  Using this switch, you will not be
able  to  exit  from ShellBom with the exit command or Alt+F4.  Use this if
you want to use ShellBom always, without exiting to the standard DOS shell.
But  use  it  only  the first time you call ShellBom.  It's not useful when
running  under  Windows.   You  can  still  exit from ShellBom if you press
Ctrl+F4.

  /K  command  line  :   Passes  a command line to be executed by ShellBom.
After  the  execution, ShellBom will work as usual.  This command line will
not  be  added to the command history.  This must be the last switch passed
to  ShellBom,  because  all  text  following it will be used as the command
line.

  /C  command  line :  Passes a command line to be executed by ShellBom and
exits  after the execution.  This switch is used to emulate the command.com
behaviour,  when called by other programs.  See Tips below.  This must also
be the last switch passed to ShellBom.



Tips:
-----

  ShellBom  needs  command.com  or  an  equivalent  command  interpreter to
actually  execute  the  commands  you  type.   The command interpreter must
support  the  /C  switch of command.com .  By default, ShellBom will try to
use   the  command  interpreter  defined  in  the  SBOMCOMSPEC  environment
variable.   If  this variable is not defined or invalid, it will try to use
the  command  interpreter defined in the COMSPEC environment variable, that
is  usually assigned by DOS to the command.com program.  Most programs that
support  a  "DOS  Shell"  function,  will  also use the command interpreter
defined  in  the COMSPEC variable.  If you are using ShellBom and then call
one  of  these  programs  and  use the DOS Shell function, it will call the
standard  DOS  shell,  not  ShellBom.  But there is a way to make they call
ShelBom instead of command.com .  You can set the COMSPEC variable to point
to  the  ShellBom  executable  (with full path name) and the SBOMCOMSPEC to
command.com,  before  calling ShellBom for the first time.  So the programs
will call ShellBom and ShellBom will call command.com.  You should also put
your  prefered  options in the SBOMDEFAULTS variable.  This is best done at
the  end  of your autoexec.bat file.  This procedure increases memory usage
and  can be dangerous if you don't know exactly what you are doing.  If you
do  something  wrong  you  can  lock  the  system  every time you boot your
computer.   If  it  happens, use a boot disk or boot without executing your
autoexec.bat,  and  change it.  You can put in the end of your autoexec.bat
something like the following lines:
   SET SBOMDEFAULTS=/M 3 /L 200
   SET SBOMCOMSPEC=C:\COMMAND.COM
   SET COMSPEC=C:\DOSUTILS\SHELLBOM.EXE
   SHELLBOM /p


  ShellBom  will remove invalid \ characters at the end of directory names,
so you can use a command like CD FOO\BAR\ with any DOS version.


  If  you  do not want to see my little copyright message everytime you use
ShellBom  you  can  use the /K switch with an empty command or with the cls
command.




Known Problems:
---------------

  There  is  a  problem  with  environment  variables.   When you execute a
program  or  a .bat file, ShellBom will call command.com (or equivalent) to
run  it.   But  if  the  program/batch  change  the value of an environment
variable,  like  when using the set command in a .bat file, the change will
have  no  effect  after the end of the program / batch.  It happens because
when  ShellBom  calls  command.com  to  run the program/batch file, it will
create  a new environment space for variables, that will be destroyed after
it  ends.  I don't know how to correct this without causing other problems.
You  can  execute  programs  that  change  the environment variables before
calling  ShellBom.   If  you  try  to  change  the  value of an environment
variable  using the set command directly in the command line, ShellBom will
detect it and set the value correctly.

  Warning  :   This program may contain  unknown bugs.  Use it at your  own
risk !




History:
--------
    Version 1.0 : First release.
    Version 1.1 : Fixed a  small  bug  present  in  version 1.0  that  made
commands like cd\ or dir\ (without spaces between the command name  and the
\) fail.  Filename completion still don't works in these cases.  Fixed  the
usage message.




How to contact the author:
--------------------------
  If  you have some question, comments or have found a bug in ShellBom, you
can  contact  me  by  e-mail.   But if you have any problem with it, before
contacting  me,  please make sure you have read all this text, to not waste
my time with silly questions.



                          Andre' Rodrigues de la Rocha
                          e-mail address:  adlroc@usa.net



