home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
cmdpk164.zip
/
cmdpak.inf
(
.txt
)
next >
Wrap
OS/2 Help File
|
1998-01-09
|
85KB
|
1,851 lines
ΓòÉΓòÉΓòÉ 1. CommandPak's Default Profile ΓòÉΓòÉΓòÉ
Being an extension to MLRXSHL, the CommandPak hooks itself into CmdShl via the
default profile, which is installed by the provided installation script and
makes the new functions transparent to the user.
This default profile ("PROFILE.SHL") is installed automatically by the
installation script and provides the following features (via aliases):
The following aliases are defined to replace OS/2's standard commands:
- "dir" and "ls" will call xdir.cmd.
- "copy" and "cp" will call xcp.cmd.
- "ren" and "mv" will call xren.cmd.
For these commands, a number of environment variables are set to
configure coloring and such.
Remember that aliases are case-sensitive; so if, for any reason, you
still need one of OS/2's original commands, you can capitalize your input
(e.g. "COPY" instead of "copy"), and the alias will not be executed.
The "help" command is an alias to xhelp.cmd. An environment variable
"HELP.REF" is defined, containing the three provided INF books, allowing
you to type "help ref" to access the joint online documentation of
MLRXSHL and CommandPak. The environment variable "HELP.COUNTRY" is set
according to the language you selected during installation.
The "open" command is defined in an alias; it can open WPS folders.
The "recurse" command is defined in an alias; it can recursively execute
commands through subdirectories.
A command history is implemented which will retain the entered commands
after the session closes. The command history is read from/stored in the
file whose name is contained in the 'history' variable (by default
%tmp%\history.shl). F2 is used to store the current command history list
to this file. F5 is used to replace the current history list by the one
defined in the file. F7 is used to interactively give a new name for the
file (to be used by subsequent F2 or F5 actions). The default history
file is loaded at startup (the 'LOADHIST' invocation); it is stored upon
exiting.
The "exit" command is redefined by an alias which will store the command
history (as described above) and only then exit.
You can close any CmdShl session with Alt+F4 also; this will simulate
"exit".
The profile redefines the '(' key so that it adds the closing ')'.
It defines the F8 key so that it inserts the current date at the cursor
position.
It defines the Shift+F7 key so that it displays all possible completions
for the element preceding the cursor.
A screen management system is added:
- You can save the current "screen" by pressing Ctrl+Down arrow.
- You can restore a previously saved "screen" by pressing Ctrl+Up
arrow.
- You can toggle between the current "screen" and the last previously
saved one by pressing Ctrl+Numpad +. It allows you to easily switch
between two different "screens". When more than one "screen" are
saved, they are stored in a stack (that is, the last stored "screen"
is the first restored one.)
The "screen" above means the current state (screen layout, currently
edited command, current directory and such). This feature has been added
to circumvent the 16 OS/2 sessions limit and also because it's much
simpler to press Ctrl+Up/Down arrow than to start or switch to another
session. On the down side, it does not work from other VIO applications
;
A commented version of the profile is also installed under the name
"PROFILEC.SHL". If you wish to change the profile, I recommend browsing
through the commented version, make the neccessary changes, and when you
consider your version worth using permanently, remove all comments and empty
lines in order to speed up processing.
Other external functions of CommandPak, which need not be defined in the
default profile, are:
ln - create "links" via WPS shadows
watchdrv - watch out for removeable media
ΓòÉΓòÉΓòÉ 2. xdir ΓòÉΓòÉΓòÉ
What's that?
Installation
Starting xdir / command line options
Environment variables
Known limitations
History
ΓòÉΓòÉΓòÉ 2.1. What's That? ΓòÉΓòÉΓòÉ
xdir is another alternative to OS/2's original DIR command. It has derived from
MLRXSHL's SDir. It is supposed to be 100% compatible both with SDir and OS/2's
original.
Compared to OS/2 "DIR", xdir provides some new functionality:
It can color output according to user-defined rules; the coloration is
completely directed by environment variables.
It fixes minor bugs to the original DIR when the /W option is used.
It can display abstract WPS objects (shadows and program objects).
xdir has a far better options handling; while it understands all of OS/2
"DIR"'s options, it also incorporates LOTS of new options, most of them
stolen from the UNIX "ls" command. Options can be introduced both with
"/" and "-".
xdir has the "UNIX output format"; while the OS/2 "wide" format (/W
option) sorts things from left to right, the new "-C" option sorts
everything from top to bottom, which I consider more lucid and readable:
You can see the difference between "/W" and "-C" output. Your preferred format
can also be set in an environment variable. In the screenshot, files that have
been modified during the last three days are put on a blue background;
executables are red, directories green. xdir automatically displays messages
in the installed language (German in the above screenshot).
If you're familiar with UNIX or an experienced OS/2 user, I recommend using
xdir. In the default profile, "dir" and "ls" are registered as aliases to
xdir.
This documentation covers all of xdir's functions; it is not necessary to get
to know MLRXSHL's SDir first.
ΓòÉΓòÉΓòÉ 2.1.1. What Are WPS Abstract Objects? ΓòÉΓòÉΓòÉ
As you might know, everything in the WPS is called an "object": be it actual
files in the filesystem (such as "netscape.exe" or your text files),
directories, program objects, shadows, and more.
The WPS knows a number of objects that are not represented directly in the
filesystem though; these are called "abstract objects" (derived from the WPS
class "WPAbstract"). The most important two of these are shadows and program
objects.
OS/2 does not put these into the actual file system, but rather puts them in
the INI files altogether ("OS2.INI" and "OS2SYS.INI" in the /OS2 directory;
these two are normally hidden). This is why you lose all your program objects
and shadows when the WPS gets corrupted and you have to re-install OS/2.
Due to this implementation, unfortunately, you cannot normally see abstract
objects on the command line, but only in WPS folders. xdir changes this with
the "-W" option: when turned on, abstract objects are also collected and marked
with a trailing "@" to distinguish them from "real" files. If you like this,
you can put the "-W" option in DIRCMD also.
The above screenshots show the contents of a directory full of INF books, which
are normally shown to the WPS with the use of program objects starting VIEW.EXE
with the respective book as an argument. On the left you can see the output of
"xdir -W", on the right the respective WPS folder.
Be aware though that collecting abstract objects is a bit slow; I have found no
way to speed it up at this point.
ΓòÉΓòÉΓòÉ 2.2. Installation ΓòÉΓòÉΓòÉ
xdir's files are installed automatically by the installation script provided
with this package. In the default profile, it is registered as an alias for
"dir" and "ls"; this way, when you enter these commands within CmdShl, xdir.cmd
will be executed instead of OS/2's original.
Installing xdir manually is also very simple: just copy XDIR.CMD somewhere
along your PATH and REXXVIO.DLL somewhere along your LIBPATH. For display of
abstract WPS objects, WPTOOLS.DLL is also needed along your LIBPATH.
If REXXVIO.DLL is currently in use, close ALL your OS/2 windowed or fullscreen
sessions, and open a bare OS/2 windowed session (that is, one not starting
CmdShl or Fl). You can then replace REXXVIO.DLL from this session.
If you were using a previous version of MLRXSHL, execute the following code
from an OS/2 command prompt, to allow the new functions defined in REXXVIO to
be registered:
rexxtry call VioDropFuncs
If you want to automatically use xdir instead of DIR, you can add an alias, if
your command shell processor recognizes them. For example, with CmdShl, use:
ALIAS dir=xdir %*
You can also add your preferred settings for environment variables in your
profile.
ΓòÉΓòÉΓòÉ 2.3. Starting xdir / Command Line Options ΓòÉΓòÉΓòÉ
xdir is intended to be a mixture between OS/2 "DIR" and UNIX "ls". The options
of both of these commands are understood; you can either introduce them with
"/" or with "-". When using "/" to introduce options, the following letters are
translated internally to lower case to maintain compatibily with OS/2 "DIR";
however, this means that you can only access the upper case options (see below)
by introducing them with "-".
You can group single-letter options together (e.g. use "-lsa" instead of "/l /s
/a"); this does, of course, not work with options which expect several letters
(such as "-o:d").
Type "xdir -h" to see a short list of the available options. Here are the
provided options sorted by the functions they provide:
Display format
-l long format (like OS/2 "DIR" default and UNIX "ls -l"). This is
the only option which is incompatible to OS/2 "DIR": there, "/L"
will display file names in lower case. Use "-L" instead.
-w wide format: display file names only, group them in coloums sorted
from left to right (like OS/2 "DIR /w")
-C UNIX format: the same, but group them from top to bottom
(like UNIX "ls" default).
-x[:{a|d|t|s|e|l}...
eXtended format: like long format, but you can specify what
information will be displayed. The letters mean the following:
a file attributes
d file creation date
t file creation time
s file size
e extended attribute size
l .LONGNAME extended attribute (in brackets)
When no letters are given ("-x" only), "-x:asel" is assumed.
-b|1 show filenames only (like OS/2 "DIR /B" and UNIX "ls -1").
-f show full path for each file (like OS/2 "DIR /F").
-L|U display all file names in lower / upper case.
-p pause output after each page (like OS/2 "DIR /P").
You can most easily define your preferred display format in your CmdShl profile
by setting the DIRCMD environment variable:
SET DIRCMD=-C
File filtering
-a[:{[-]d|h|r|s|a|w}...]
include files with specified attributes; exclude files when used
with "-" with every letter.
The letters mean the following:
d directories
h hidden files
r read-only files
s system files
a files with the "archive" flag
w abstract WPS objects (see "-W" option below)
-W also display abstract WPS objects (meaning shadows and program
objects). This uses WPTOOLS.DLL and can be fairly slow when many
objects are in the directory. Abstract objects are colored
according to the DIRCLR.WPABSTRACT environment variable and a "@"
is added to the object name. "-W" is really just a shortcut to the
"-a:w" option (see above).
Please see the "What are abstract WPS objects" page for details
and screenshots.
-d display directories only (shortcut to "-a:d")
-s|R display files in all subdirectories also (like OS/2 "DIR /S" and
UNIX "ls -R").
Sort output
-o[:{n|e|d|s|g}]
Sort files in a certain order. The letters mean the following:
n by name
e by file extension (e.g. ".EXE")
d by creation date (shortcut: "-t" option)
s by file size (shortcut: "-S" option)
g show directories first
When "-o" is not followed by ":", "-o:n" is assumed.
-t|S sort by date | size (shortcut to "-o:s|d").
Miscellaneous options
-h -? /H /? display help
ΓòÉΓòÉΓòÉ 2.4. Environment variables ΓòÉΓòÉΓòÉ
xdir recognizes the following environment variables:
DIRCMD / XDIR.DIRCMD
DIRCLR.ATTRIB
DIRCLR.DATE
DIRCLR.EASIZE
DIRCLR.EXT
DIRCLR.NAME
DIRCLR.SIZE
DIRCLR.USEREXIT
DIRCLR.WPABSTRACT
If one or more of those environment variables are not defined, the missing ones
are silently ignored.
You can either set the desired environment variables in CONFIG.SYS or in your
profile. The latter is recommended, since no reboot is required for profile
changes to take effect. Since almost none of these variables are recognized by
CMD.EXE anyway, profiles are just fine.
Here is an example (see the default profile for more):
REM xdir preferred options: display files like UNIX "ls" does
SET XDIR.DIRCMD=-C
REM xdir coloring
SET DIRCLR.ATTRIB=D:GREEN;H,S:ON RED;R:BLINK
SET DIRCLR.DATE=-30:BRIGHT
SET DIRCLR.EXT=BAT,EXE,COM,CMD:CYAN;ZIP:YELLOW;INI:MAGENTA
SET DIRCLR.NAME=PROFILE:MAGENTA
SET DIRCLR.WPABSTRACT=BRIGHT GREEN
The order in which coloration is applied is the following:
1. User exit;
2. Directory attribute;
3. Other attributes : Archive, Read only, System, Hidden;
4. File extension (if any);
5. File name;
6. File date;
7. File size;
8. Extended attributes size.
An element of higher priority takes precedence over an element of lower
priority. For example, if you specify a green background for directories and
red background for recent entries, a directory will always have a green
background, regardless of its last modification date.
The color specification is of the form:
[BRIGHT] [BLINK] [<color>] [ON <color>]
with <color> being one of BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN or
WHITE.
The case is not significant. Depending on your display type (full screen or
VIO window), specifying BLINK may result in either a blinking character or a
high intensity background color.
ΓòÉΓòÉΓòÉ 2.4.1. DIRCMD / XDIR.DIRCMD ΓòÉΓòÉΓòÉ
These two environment variables set the default options used for xdir. First,
XDIR.DIRCMD is checked; only if not defined, DIRCMD is checked next. This way,
you can set xdir-specific options in XDIR.DIRCMD only in order to prevent SDir
and OS/2's standard DIR from malfunction.
Usage:
SET XDIR.DIRCMD=<optionlist>
SET DIRCMD=<optionlist>
<optionlist> is a list of options as you would normally type them on the
command line. This way, you can configure xdir to a certain default behavior.
The options specified herein will be processed immediately after xdir has been
started and before the arguments given on the command line are evaluated. This
way, you can override the default options on the command line.
It is recommended to set XDIR.DIRCMD in a CmdShl profile; you can set it also
in CONFIG.SYS, although this will require a reboot for each changement made.
Example:
SET XDIR.DIRCMD=-C -o:n
xdir will now per default use the UNIX format and sort everything by name.
These options are better not defined in DIRCMD, but in XDIR.DIRCMD instead,
since SDir and OS/2's standard DIR do not know them.
Still, if you now type "xdir -l", the "-C" option will be overridden.
ΓòÉΓòÉΓòÉ 2.4.2. DIRCLR.ATTRIB ΓòÉΓòÉΓòÉ
This environment variable specifies the coloration to be used if an entry
attribute has been set.
SET DIRCLR.ATTRIB=<attrib>[,...]:<color>[;...]
<attrib> can be one of D, A, R, S or H (case is not significant).
If an attribute is defined more than once, the last definition is used.
Example:
SET DIRCLR.ATTRIB=D:green;H,S:ON RED;R:BLINK
Directories will be displayed in green, hidden or system entries will be
displayed on a red background, and read-only ones will be blinking (or, in a
VIO Window, the background will be intensified).
ΓòÉΓòÉΓòÉ 2.4.3. DIRCLR.DATE ΓòÉΓòÉΓòÉ
This environment variable specifies the coloration to be used depending of the
entry's last modification date.
SET DIRCLR.DATE=[-+=]<date>:<color>[;...]
If <date> is a number, it specifies a number of day. Otherwise, it's a date in
ISO format (yyyy/mm/dd).
If you have specified a number of day, a leading '-' selects files
modified in the last <date> days. A leading '+' selects files that have
not been modified in the last <date> days. A leading '=' only selects
files modified exactly <date> days ago (it's not that useful :-) ).
If you have specified a date, a leading '-' selects files that have not
been modified since date. A leading '+' selects files that have been
modified since date. A leading '=' only selects files modified on date.
The first matching value is used. The evaluation order is from left to right.
Example:
SET DIRCLR.DATE=-30:bright
A bright color will be used for files modified in the last 30 days.
ΓòÉΓòÉΓòÉ 2.4.4. DIRCLR.EASIZE ΓòÉΓòÉΓòÉ
Not implemented yet.
ΓòÉΓòÉΓòÉ 2.4.5. DIRCLR.EXT ΓòÉΓòÉΓòÉ
This environment variable specifies the color to be used depending on the entry
extension.
SET DIRCLR.EXT=<ext>[,...]:<color>[;...]
<ext> is the extension (without the leading dot) to be colored. It is case
insensitive. Joker symbols ('*' and '?') are NOT allowed.
If an extension is specified more than once, the last specification is used.
Example:
SET DIRCLR.EXT=BAT,EXE,COM,CMD:CYAN;ZIP:YELLOW
Files ending with either .BAT, .EXE, .COM or .CMD will be displayed in cyan,
while archive files (ending with .ZIP) will be in yellow.
ΓòÉΓòÉΓòÉ 2.4.6. DIRCLR.NAME ΓòÉΓòÉΓòÉ
This environment variable specifies the color to be used depending on the entry
name.
SET DIRCLR.NAME=<name>[,...]:<color>[;...]
<name> is the name to be colored. It is case insensitive. Joker symbols ('*'
and '?') are NOT allowed; neither are null ("") names.
If a name is specified more than once, the last specification is used.
The name of an entry is the part preceding the extension. For example:
foo --> foo
bar.baz --> bar
foo.bar.baz --> foo.bar
Example:
SET DIRCLR.NAME=PROFILE:magenta
Files whose name is PROFILE will be in magenta.
ΓòÉΓòÉΓòÉ 2.4.7. DIRCLR.SIZE ΓòÉΓòÉΓòÉ
Not implemented yet.
ΓòÉΓòÉΓòÉ 2.4.8. DIRCLR.USEREXIT ΓòÉΓòÉΓòÉ
Not implemented yet.
ΓòÉΓòÉΓòÉ 2.4.9. DIRCLR.WPABSTRACT ΓòÉΓòÉΓòÉ
This environment variable specifies the coloration to be used for abstract WPS
objects. Compared to the previously listed options, its syntax is rather dull:
SET DIRCLR.WPABSTRACT=<color>
ΓòÉΓòÉΓòÉ 2.5. Known Limitations ΓòÉΓòÉΓòÉ
The EA size is incorrectly reported if it exceeds 32767 bytes. (In fact,
4OS2 as well as the Workplace Shell also exhibit this behavior.)
The sort is currently handled by a REXX procedure, so it's quite slow if
you don't have a fast computer. (If you don't use the /o option,
speed will be OK.)
Display of abstract WPS objects is quite slow also.
After creating shadows, they are not immediately visible to "xdir -W". It
will take a few seconds (and maybe a few executions of "xdir -W") to make
them appear. This seems to be limitation either of the WPS implementation
or in the WPTOOLS.DLL that is used for collecting abstract WPS objects; I
have no influence on these functions.
xdir does not tell shadows and program objects apart. All abstract
objects are displayed with the "-W" option and marked with a trailing
"@".
Some environment variables are not yet recognized: DIRCLR.SIZE,
DIRCLR.EASIZE and DIRCLR.USEREXIT.
In DIRCLR.DATE, each month contains 31 days (and hence a year contains
372 days).
ΓòÉΓòÉΓòÉ 2.6. History ΓòÉΓòÉΓòÉ
1.63 Dec 20, 1997
--- New features:
Support for XDIR.DIRCMD added.
1.62 Dec 14, 1997
--- Bug fix:
Fixed: Display of error messages still crashed when invalid drives were
given.
1.61 Dec 6, 1997
--- Re-implemented new features over SDir 0.96:
Options handling replaced: "-" and "/" can be used alternatively; options
can be grouped at will; translating "/" options to lower case.
-C option added: UNIX format (top to bottom)
-W option added: abstract WPS objects.
-x option added: specify what information is to be displayed. Can handle
.LONGNAMEs.
-l reworked: just a shortcut to "-x:dtse"
-h will run "xhelp xdir"
-F added (classify files)
-L|U added (lower / upper case)
plus a few more options for UNIX "ls" compatibility ("-1", "-R", "-S",
"-t", "-d")
--- Bug fix:
sdir crashed in error message when wrong options were given.
1.5 Septemper 1997
--- First public release based on SDir 0.91 (version numbering now according
to CommandPak)
ΓòÉΓòÉΓòÉ 3. xcp ΓòÉΓòÉΓòÉ
What's that?
Installation
Starting xcp / command line options
Known limitations
History
ΓòÉΓòÉΓòÉ 3.1. What's That? ΓòÉΓòÉΓòÉ
xcp is CommandPak's alternative to OS/2's original COPY command. It is supposed
to be 100% compatible with it (and since it frequently uses the original
internally, it should be). It also introduces a few new options from the UNIX
"cp" command.
xren can remove those annoying .LONGNAME extended attributes while
copying.
When copying files, xren provides a useful backup options for files that
already exist in the destination directory. Per default, you will be
prompted for whether you want the original file to be overwritten, backed
up, or skipped.
In the default profile, "copy" and "cp" are defined as aliases to "xren", thus
replacing OS/2's original "COPY".
The name "xcp" was chosen in order not to conflict with OS/2's "XCOPY"
command, which provides additional functionality over xcp.
xcp is only intended to improve "simple" copying. It cannot, for example,
recurse subdirectories (like XCOPY); furthermore, not all of OS/2's standard
"COPY"'s functions are implemented at this point. Please see "Known
limitations" for more.
xcp uses the OS/2 "COPY" command internally, so that extended attributes are
properly copied.
ΓòÉΓòÉΓòÉ 3.1.1. What Are .LONGNAME Extended Attributes? ΓòÉΓòÉΓòÉ
While "standard" file attributes contain only flags (to mark a file as being a
directory, hidden etc.) and were already known to DOS, Extended attributes
(EAs) are an OS/2 specific addition to any file residing in a file system. They
can contain any data up to a total size of 64 KB per file.
On FAT drives, EAs are stored for all files altogether in two hidden
files in the root directory (named "wp root. sf" and "ea data. sf" --
yes, including spaces!).
On HPFS drives, EAs are stored (invisibly) within the file system
structure for each file separately, which is, of course, much faster.
OS/2 makes heavy use of EAs: the WPS stores class information, abstract object
references, icons, long filenames, and much more in them and when REXX
programs are "compiled" ("tokenized") to make them process faster, the result
is also stored in EAs. By the way -- since EAs are limited to 64 KB per file,
large REXX files take a long time to start, since they have to be re-tokenized
at every start.
While the EAs for long filenames (named ".LONGNAME") are useful on FAT drives
and for storing certain characters which are not allowed for "real" filenames
(such as "/", "\", ">" etc.), the WPS annoyingly adds these every time when it
works on files (e.g. moving, copying, renaming files), whether neccessary or
not. When you rename a file on the command line which has a .LONGNAME EA
attached to it, the WPS will keep displaying the old name, since the .LONGNAME
EA hasn't changed. With xcp and xren you can now delete .LONGNAMEs.
ΓòÉΓòÉΓòÉ 3.2. Installation ΓòÉΓòÉΓòÉ
xcp is installed automatically by the installation script provided with this
package. In the default profile, "copy" and "cp" are registered as aliases for
xcp; this way, when you enter one of these within CmdShl, xcp.cmd will be
executed.
xcp requires xhelp.cmd to be present on the PATH in order to display its
messages.
Installing xcp manually is also very simple: just copy XCP.CMD somewhere along
your PATH.
If you want to automatically use xcp instead of DIR, you can add an alias, if
your command shell processor recognizes them. For example, with CmdShl, use:
ALIAS copy=xcp %*
ΓòÉΓòÉΓòÉ 3.3. Starting xcp / Command Line Options ΓòÉΓòÉΓòÉ
Basically, xcp operates just like OS/2's "COPY". The main difference is that
for each file to be copied, the destination is checked for whether a file of
the respective name already exists. If so, you will be prompted whether to skip
the current file, backup or overwrite the original. OS/2's "COPY" command will
simply overwrite existing files.
When backing up files, the WPS's renaming behavior is imitated (e.g. "xren.cmd"
becomes "xren!1.cmd").
Certain (new) options are also allowed here:
-b Always backup existing files, don't prompt.
-f "Force" mode: overwrite existing files, don't prompt.
-i Interactive mode: confirm copying for each file.
-t Test mode: do nothing, display actions only.
-v Be verbose: echo each modification made.
-q Be quiet: say nothing, not even error messages.
-d Delete .LONGNAME before renaming.
-8 Make filenames FAT-compliant (8+3 characters)
.LONGNAME EAs are automatically checked for "important" characters which are
not allowed in real filenames, such as "/", "\", ">" etc. If one of these is
detected when using "-r", these characters are replaced by "!" (just like the
WPS does). When using "-d", the .LONGNAME is not deleted, but retained, unless
you enable the "-f" option, which will enforce deletion.
FAT compliance ("-8" option) is achieved by simply truncating the filename and
extension to 8 and 3 characters, respectively; for example, the file
"aprettylongfilename.html" would be changed to "aprettyl.htm".
Example:
xcp -i a* b*
will copy all files starting with "a", changing the first character to "b". You
will be prompted for every file.
ΓòÉΓòÉΓòÉ 3.4. Known Limitations ΓòÉΓòÉΓòÉ
Although xcp's code is based on xren and should thus be fairly reliable,
please be aware of the fact that this is an initial release and might
still contain a bug or two.
xcp presently has no language support; its messages will always be in
English. Sorry.
Since the filesystem type is not checked when copying files, the backup
functions may not work on FAT drives when the file to be backed up is
tried to be renamed to a name that does not obey FAT 8+3 naming
conventions. Specify the "-8" option before backing up files on FAT
drives, or the originals will be lost.
xcp does not yet support all features of OS/2's "COPY" command. The
following functions do not work:
- joining files with the "+" sign;
- treating ASCII and binary files differently ("/A" and "/B" options);
- changing the target file date/time ("+ ,," option);
- EOF and verify options ("/A", "/B", "/V", "/F");
- copying to devices (such as "prt:" etc.); xcp is for copying files
into files only.
See the OS/2 Command Reference for details.
If you need one of the above features and xcp was installed as a
replacement for OS/2's "copy", simply type "COPY" in capital letters;
since aliases are case-sensitive, OS/2's "copy" will be called instead of
xcp.cmd.
ΓòÉΓòÉΓòÉ 3.5. History ΓòÉΓòÉΓòÉ
1.64 Jan 1, 1998
--- Initial release.
ΓòÉΓòÉΓòÉ 4. xren ΓòÉΓòÉΓòÉ
What's that?
Installation
Starting xren / command line options
Known limitations
History
ΓòÉΓòÉΓòÉ 4.1. What's That? ΓòÉΓòÉΓòÉ
xren is CommandPak's alternative to OS/2's original REN command. It is supposed
to be 100% compatible with it (and since it frequently uses the original
internally, it should be). In addition though, there are a number of nifty new
things:
xren also supports "MOVE" functionality. I added this to the "rename
context" since under UNIX the "mv" command also does the two tasks
together. Moving is enabled as soon as the second specification includes
a different path.
When moving files, xren provides a useful backup options for files that
already exist in the destination directory.
xren can rename files to upper and lower case (HPFS only).
xren can work on those annoying .LONGNAME extended attributes; try "xren
-d".
You can even change the real name to the contents of the .LONGNAME EA.
This can be useful when having moved files from an HPFS drive to FAT and
back; sometimes the real file names will have been truncated to FAT 8+3
format, while the .LONGNAMES still contain the former long filenames
(which the WPS will display, although all other software will only see
the crippled filenames). Try "xren -r" in this situation.
In the default profile, "ren" is defined as an alias to "xren", thus replacing
OS/2's original; a second alias, "mv" is also defined.
Depending on whether files are renamed or moved, xren uses OS/2's "REN" and
"COPY"/"DEL" commands internally. As a result, extended attributes are copied
properly.
ΓòÉΓòÉΓòÉ 4.1.1. Why Are Upper and Lower Case Important? ΓòÉΓòÉΓòÉ
With different operating systems, upper and lower case can become a problem.
OS/2 is capable of remembering upper and lower case in file systems,
provided that the file system you are using remembers case, which HPFS
does, for example. As a result, it makes a difference whether you name a
file "TEXT.TXT" or "text.txt". This behaviour is sometimes described as
OS/2 being "case-retensive". On FAT drives however, case will not be
remembered (except for in .LONGNAME EAs).
UNIX systems however do not only preserve case, but are "case-sensitive"
also: in the same directory, "TEXT.TXT", "TEXT.txt" and "text.txt" will
be three completely different files. Now, if you try to open a fourth
combination, e.g. "text.TXT", you will get an error, since this name is
not found by the system.
DOS however is completely ignorant about case in file names: "FILE" and
"file" are not considered to be any different, and whatever you specify
is always converted into upper case.
With Windows 95, I don't really know: It seems that case is remembered
somewhere in the wicked VFAT file system, but the system doesn't care
much, and annoyingly keeps converting file names on its own.
While you maybe don't care much about UNIX, you'll probably find out more
about case-sensitivity when uploading a number of HTML files to a UNIX web
server. If you have not paid attention to lower and upper case, your links in
the HTML pages will provoke errors, since the serving UNIX system will
consider files to be non-existent. With xren, just try typing "xren -L *", and
a whole directory will be in lower case -- before uploading, of course. ;-)
ΓòÉΓòÉΓòÉ 4.2. Installation ΓòÉΓòÉΓòÉ
xren is installed automatically by the installation script provided with this
package. In the default profile, "ren" and "mv" are registered as aliases for
xren; this way, when you enter this within CmdShl, xren.cmd will be executed.
xren requires xhelp.cmd to be present on the PATH in order to display its
messages.
Installing xren manually is also very simple: just copy XREN.CMD somewhere
along your PATH.
If you want to automatically use xren instead of DIR, you can add an alias, if
your command shell processor recognizes them. For example, with CmdShl, use:
ALIAS ren=xren %*
ΓòÉΓòÉΓòÉ 4.3. Starting xren / Command Line Options ΓòÉΓòÉΓòÉ
Basically, xren operates in three different modes:
1. Rename mode: this is the standard OS/2 "REN" functionality. This mode is
entered when two file specifications are given on the command line, the
second of which does not contain a path specification.
Certain (new) options are also allowed here:
-i Interactive mode: confirm renaming for each file.
-t Test mode: do nothing, display actions only.
-v Be verbose: echo each modification made.
-q Be quiet: say nothing, not even error messages.
-d Delete .LONGNAME before renaming (see notes below).
-8 Make filenames FAT-compliant (8+3 characters)
(see notes below).
Example:
xren -i a* b*
will change the first character of all files starting with "a" to "b" and
have you confirm each file.
2. Move mode: this incorporates OS/2 "MOVE" functionality into xren. This
mode is entered when two file specifications are given, the second of
which contains a path specification though. Moving is performed in two
steps: first the file is copied (to a new name, when specified), then the
original is deleted.
If a file already exists in the destination directory, you will be
prompted whether the original file should be overwritten, skipped or
backed up. With the latter, the WPS renaming behaviour is imitated (e.g.
"xren.cmd" becomes "xren!1.cmd").
When moving, allowed options are:
-i Interactive mode: confirm moving for each file.
-t Test mode: do nothing, display actions only.
-b Always backup existing files, don't prompt.
-f "Force" mode: overwrite existing files, don't prompt.
-v Be verbose: echo each modification made.
-q Be quiet: say nothing, not even error messages.
-d Delete .LONGNAME before renaming (see notes below).
-8 Make filenames FAT-compliant (8+3 characters)
(see notes below).
Examples:
xren -b a* \documents
will move files starting with "a*" to the "\documents" directory and make
backups of already existing files.
xren -f a* \documents\b*
will move files starting with "a*" to the "\documents" directory,
changing the first character to "b". Existing files will be overwritten
without warning.
3. Extended mode: this is all new and previously not available on OS/2. This
mode is entered by specifying a respective option and ONLY ONE file
specification; you cannot use the extended options in conjunction with
two file specifications (as in rename/move mode) in order to avoid
conflicts, except for the "-d" option (see above). The extended options
are:
-d Delete .LONGNAME extended attributes
(see notes below).
-8 Make filenames FAT-compliant (8+3 characters).
-r Change real names to respective .LONGNAMEs.
-L|U Rename files to upper/lower case; this will change the real
names only. This works on HPFS only, since FAT is not case-
retensive.
Examples:
xren -r a.txt (a.txt has "b.txt" as a .LONGNAME)
will rename "a.txt" to "b.txt".
xren -d *.txt
will remove .LONGNAMEs for all ".txt" files.
Notes:
.LONGNAME EAs are automatically checked for "important" characters which
are not allowed in real filenames, such as "/", "\", ">" etc.
If one of these is detected when using "-r", these characters are
replaced by "!" (just like the WPS does).
When using "-d" with "important" .LONGNAMEs, the .LONGNAME is not deleted
but retained, unless you have also enabled the "-f" option, which will
enforce deletion.
FAT compliance ("-8" option) is achieved by simply truncating the
filename and extension to 8 and 3 characters, respectively; for example,
the file "aprettylongfilename.html" would be changed to "aprettyl.htm".
Type "xren -h" to see a short syntax description and valid options
combinations.
ΓòÉΓòÉΓòÉ 4.4. Known Limitations ΓòÉΓòÉΓòÉ
xren presently has no language support; its messages will always be in
English. Sorry.
There are still some limitations when working on groups of files with
wildcards (e.g. with "ren a* b*"). Presently, only leading or trailing
wildcards are allowed (e.g. not "ren a*.cmd b*.cmd").
Since the filesystem type is not checked when moving files, the backup
functions may not work on FAT drives when the file to be backed up is
tried to be renamed to a name that does not obey FAT 8+3 naming
conventions. Specify the "-8" option before backing up files on FAT
drives, or the originals will be lost.
Although upper and lower case only make a difference on HPFS drives, the
file system type is not checked by xdir in order not to conflict with any
unusual user-installed file systems. Performing upper/lower case renaming
on FAT drives will have no effect.
When renaming files to upper/lower case (be it with the "-L"/"-U" options
or e.g by using "xren *.INF *.inf"), the WPS does sometimes not recognize
that something has changed, especially when you perform this on a
directory whose WPS folder is currently open. It seems that the WPS is
not only non-case-sensitive, but even completely case-ignorant. Since in
this particular case the new names are only recognized after a reboot, I
suspect the problem lies somewhere in the WPS file caches which are not
properly updated.
Even worse, when dragging/dropping one of these "incorrect" files with
the WPS, the former name is passed to the receiver. This means when you
drop these files into another folder or when you drop files to another
application, the former case is restored. I have had problems with this
dragging these files to an FTP application, which then uploaded the files
in upper case to my UNIX web server (which, again, is case-sensitive).
:-(
Although this behavior is rather annoying, I presently know no perfect
solution to overcome this. There's one workaround in renaming the files
twice: first to something more different than just the case, then close
and re-open the respective WPS folder, then rename the files again to
what you really want. Example (for renaming "*.INF" to "*.inf"):
xren *.INF *.xyz
(close and re-open WPS folder)
xren *.xyz *.inf
ΓòÉΓòÉΓòÉ 4.5. History ΓòÉΓòÉΓòÉ
1.64 January 2, 1998
--- New features:
"-8" option added (FAT naming)
Deleting .LONGNAMEs can be enforced with "-f" even when they contain
important characters.
1.63 December 20, 1997
--- New features:
All functions work on directories also.
Better backup functions.
"-d" (delete .LONGNAMEs) works now in move/rename mode also.
"-i" (interactive) works now in all modes.
--- Bug fixes:
Rebuilt xren almost completely since options didn't work together right.
Moving/renaming should now work properly.
Problems with case sensitivity fixed.
1.61 December 6, 1997
--- New features:
Added "move" functionality when different path is given.
1.00 somewhere in september 1997
--- Initial release with .LONGNAME support.
ΓòÉΓòÉΓòÉ 5. xhelp ΓòÉΓòÉΓòÉ
What's that?
Installation
Starting xhelp / command line options
Recognized environment variables
Help file format
Supported HTML tags
Supported escape sequences
Known limitations
History
ΓòÉΓòÉΓòÉ 5.1. What's That? ΓòÉΓòÉΓòÉ
xhelp is intended to be the universal help interface on the command line; it
provides access to the help messages for MLRXSHL and CommandPak, which are
formatted according to the Hypertext Markup Language (HTML). Support for
different languages is provided via environment variables.
In the default profile, a "help" alias is registered to access xhelp.
xhelp operates in several modes (see the following page for details):
You can bring up help messages for the most important functions of
MLRXSHL and CommandPak. Example:
help dir
You can open online documentation (INF files, for the OS/2 Information
Presentation Facitily). Example:
help cmdref
This will open the OS/2 Online Reference ("CMDREF.INF").
You can search a certain known INF book for content. Example:
help cmdref format
This will find the description of the FORMAT command in the OS/2 Online
Reference ("CMDREF.INF").
You can search ALL available INF books for content. Example (information
on a certain CONFIG.SYS driver):
help ibm1s506
You can get further help on those strange OS/2 SYS messages. Example:
help 2166
You can display any existing HTML file on your harddisk. Example:
help C:\HTML\blah.html
You can issue a HTML (sort of) text directly. Example:
help "<HTML>blah</HTML>"
See Supported HTML tags for details.
Moreover, "help list" will give you a list of what's currently accessible with
xhelp.
ΓòÉΓòÉΓòÉ 5.2. Installation ΓòÉΓòÉΓòÉ
xhelp is installed automatically by the installation script provided with this
package. In the default profile, "help" and "?" are registered as aliases for
xhelp; this way, when you enter one of these within CmdShl, xhelp.cmd will be
executed.
It is NOT recommended to remove xhelp from your PATH, since most of
CommandPak's rely on it for displaying their messages in order to be
language-independent.
Installing xcp manually is also very simple: just copy XHELP.CMD somewhere
along your PATH.
If you want to automatically use xhelp instead of HELP, you can add an alias,
if your command shell processor recognizes them. For example, with CmdShl, use:
ALIAS help=xhelp %*
ΓòÉΓòÉΓòÉ 5.3. Starting xhelp / Command Line Options ΓòÉΓòÉΓòÉ
Generally, xhelp has several modes of operation: it can either display a
built-in message, open an .INF book completely, search in .INF books for a
certain topic, or display any external file (both simple text and HTML format).
All of xhelp's internal messages have been put into a single file named
'XHELPxxx.MSG' with "xxx" being a language code. By setting the environment
variable "HELP.COUNTRY", you can switch to another language, provided that the
respective message file exists along the PATH. If the variable is not defined,
the default "001" for English is assumed. See Help File Format for details.
The syntax at the command line is as follows (the "help" alias is assumed in
this description):
help If you're new to CommandPak, just type "help" to
receive a raw introduction to the new functions.
help <internal> xhelp knows a number of commands already that are
capable of displaying help. If <internal> is one of these,
xhelp will explain something. For most parts
of MLRXSHL and CommandPak, this support has been
added in the message file. -- Example:
help ls # show help for ls (xdir)
help list display the internal list of commands known that xhelp
provides help for; moreover, this will collect and display
all INF files on the BOOKSHELF (that can thus be displayed
with "xhelp <book>").
help <topic> If <topic> is NOT on this list, xhelp next checks if
an environment variable HELP.<topic> exists. If so, its
contents are assumed to be a combination of INF files.
Two of these ("HELP.REF" and "HELP.CMDSHL") are defined
in the default profile;
help ref
will thus access the complete provided online help,
containing "MLRXSHL0+MLRXSHL+COMMANDPAK".
If no such environment variable exists, the bookshelf is
searched for an .INF file named <topic>. Example:
help cmdref # display OS/2 online reference
If no such .INF file is found, xhelp checks next if <topic>
is an existing file; if found, its contents are displayed.
Since xhelp can display HTML files (sort of), you can
even have formatted HTML output on your screen. Examples:
help index.html
help G:\blah\text.html
If this does not exist either, <topic> is assumed
to be content to search for; all books on the whole
bookshelf will be searched for <topic>. This is
started as a background process and might take a while,
depending on the number of books found. -- Example:
help ibm1s506
will find "ibm1s506" entry in OS/2's CMDREF.INF.
help [sys|rex]<number>
If <number> is numeric, help will display an
explanation for an OS/2 SYS<number> error. Examples:
help 2166 # will display help on printer error
help sys2166 # the same
help rex16 # help on REXX error message
help "<text>" Whatever is enclosed in double quotes will be displayed
directly, either formatted (if a "<HTML>" is found) or not.
See Format of the help files for details.
help ver display current CommandPak version.
help -c for info on CmdShl itself.
help -x for some examples of how to use help.
help -f <key> access a certain <key> in the message file directly.
help -w show a welcome message (used in the default profile).
Type "help -x" to see a number of examples.
ΓòÉΓòÉΓòÉ 5.4. Environment variables ΓòÉΓòÉΓòÉ
xhelp recognizes the following environment variables:
Setting xhelp's language:
HELP.COUNTRY=<xxx>
This defines the message file that xhelp uses. Whenever internal messages
(especially help messages) are displayed, xhelp searches for a file named
"XHELPxxx.MSG" on the PATH, with <xxx> being a three-digit country code
as defined by HELP.COUNTRY; if this has not been set, "001" (for English)
is assumed. Setting HELP.COUNTRY to a three-digit number will thus change
the message file that xhelp searches for. See Help File Format for
details; see the OS/2 Online Reference for a list of country codes.
Example:
SET HELP.COUNTRY=049
will switch to German messages. Please note that this file must contain
ALL of xhelp's messages, otherwise you will only get tons of error
messages.
Configuring output colors:
HELP.COLOR=<color>
This will set the standard color when displaying HTML. The <color> syntax
follows the xdir rules. If not set, no coloring is used.
HELP.ANCHOR=<color>
HELP.BOLD=<color>
HELP.ITALICS=<color>
This will set the colors for anchors (links), bold text and italics (<A>,
<B>, and <I> tags) when displaying HTML. The <color> syntax follows the
xdir rules. If not set, no coloring is used (the respective tags are
simply ignored). Certain colors are preset in the default profile.
Defining shortcuts:
HELP.<topic>=<books>
<topic>=<books>
You can define any <topic> as a "help alias" to another INF file or
several of them, joined by the "+" sign. Now, if <topic> is given as a
command line argument to xhelp and an environment variable HELP.<topic>
has been defined, xhelp will open up the INF file(s) described by the
variable. This is used in the default profile:
SET HELP.REF=MLRXSHL0+MLRXSHL+CMDPAK
So typing "help ref" will open up all three INF books of
MLRXSHL/CommandPak.
The simple <topic>=<books> is the standard syntax of OS/2's VIEW.EXE
(undocumented, I believe), which is retained for compatibily. For
example, the OS/2 Toolkit defines a number of these variables in
CONFIG.SYS. As a result, in the preceding example,
SET REF=MLRXSHL0+MLRXSHL+CMDPAK
would also work. However, the HELP.<topic>=<books> syntax is recommended
for use with xhelp, since it reduces the probability of help environment
variables interfering with those for other functions.
ΓòÉΓòÉΓòÉ 5.5. Help File Format ΓòÉΓòÉΓòÉ
xhelp can process a subset of the Hypertext Markup Language (HTML). When a
"<HTML>" tag is found in the text to be displayed, HTML processing is enabled
(see next page for details). This is checked for in the following three
situations:
xhelp processes its own message file;
xhelp is given a file location (help <file>);
xhelp is given a text directly (help "<text>").
In all three cases, if no "<HTML>" tag is found, the given text is displayed
"as is".
A xhelp message file ("XHELPxxx.MSG", with xxx being a three-digit country
code) is considered to be a joint collection of independent messages in one
file. Each message therein can either be HTML or simple text and must be
enclosed by
<TOPIC NAME="msgid">This is the message text</TOPIC>
tags.
Everything enclosed within these two tags will be extracted and treated as if
it were a separate file. Thus, if a "<HTML>" tag is found in the extracted
message, it will be formatted as HTML, otherwise displayed as normal text. The
"NAME" attribute identifies the message name; this is case-sensitive and must
be surrounded by double quotes. Browse through the provided example to see
more.
For example, if you enter "help alias" at the command line, then xhelp
searches for the <TOPIC NAME="aliasHelp"> tag in XHELP001.MSG; next, the text
preceding the next occurence of </TOPIC> is extracted. Since this alias help
message contains a <HTML> tag, it is formatted as HTML and displayed.
Now, if you want to translate CommandPak into another language, all you have
to do is finding out your country code (as described in the OS/2 Online
Reference); then copy XHELP001.MSG to XHELPxxx.MSG (with xxx being your
country code) and, translating, work your way through the message file. If you
consider your help file worth publishing, please contact me and I will include
it in CommandPak's next release.
If you want, you can also change all the HTML messages to simple text to speed
up display.
ΓòÉΓòÉΓòÉ 5.5.1. Message File Example ΓòÉΓòÉΓòÉ
The following is an excerpt from XHELP001.MSG, defining the displayed message
when you enter "help" without any arguments. In this case, xhelp searches for a
message with the message ID "helpHelpFirst", as defined in the first line.
Note the "<HTML>" tag right after the the "<TOPIC>" tag; this is neccessary to
enable HTML processing, since each message within "<TOPIC>" and "</TOPIC>" is
treated as if it were a separate file.
Also note the escape sequences "<" and ">" to display the "<" and ">"
chars.
Remember, all line breaks and repetitive spaces are ignored in HTML; the use of
tags is neccessary for this.
<TOPIC NAME="helpHelpFirst"><HTML><B>This is an overview of MLRXSHL/CommandPak
(type <A HREF="">help <command></A> for more):</B>
<UL FIRST=2 NEXT=16><LI> <B>cd</B> <TAB>can now change drives also and remembers the last directory.
<LI><B>dir / ls</B> <TAB>is a new and all-improved DIR command with coloring and more.
<LI><B>ren / mv</B> <TAB>extended rename and move; extra features
<LI><B>alias</B> <TAB>lets you define your own commands.
<LI><B>def</B> <TAB>can redefine keys, even with whole command lines.
<LI><B>rule</B> <TAB>lets you define rules for command-line editing.
<LI><B>rx</B> <TAB>allows you to process REXX commands at the command line.
<LI><B>recurse</B> <TAB>will execute a command line recursively in subdirectories.
<LI><B>open</B> <TAB>will open a directory as a WPS folder.
<LI><B>ln</B> <TAB>will create "links" via WPS shadows.
<LI><B>pushd / popd</B> <TAB>will save/recall directories.
<LI><B>less</B> <TAB>is a far better "more" than "more".
<LI><B>query</B> <TAB>is a command for querying different system information.
<LI><B>fl</B> <TAB>is a more-or-less graphical directory browser.
</UL>Type <A HREF="">help <command></A> to find out more about a certain <command>.
<BR>Type <A HREF="">help keys</A> to read a summary of the new command-line editing functions.
<BR>Type <A HREF="">help ref</A> to view the online reference with an in-depth introduction and
reference on CmdShl and the other functions.
<BR>Type <A HREF="">help help</A> to learn about usage of the "help" command.
<BR>Type <A HREF="">exit</A> to close this session.
</TOPIC>
ΓòÉΓòÉΓòÉ 5.6. Supported HTML Tags ΓòÉΓòÉΓòÉ
When formatting HTML, just like any HTML browser, xhelp will ignore any
carriage returns / line feeds (ASCII code $0d, $0a) and repetitive spaces in
the text, but rather recalculate the format of the output at every call. In
order to format the text, the use of so-called "tags" is neccessary. These are
put into angle brackets ("<tag>"); xhelp is not case-sensitive in respect to
these tags.
Tags that are not recognized by xhelp are ignored completely. As a consequence,
all text following an open angle bracket ("<") is ignored until a closing angle
bracket (">") is encountered. If you need angle brackets as characters in the
text, you have to replace them with certain escape sequences (see next page).
It is neccessary to enclose the text to be displayed in "<HTML>" tags; this
also applies for a "subtext" as defined by <TOPIC>. Otherwise, the text will
not be reformatted, but simply displayed on the screen as it is (via "say
<msg>"). Use of the "<TITLE>" and "<BODY>" tags is not required and ignored.
Presently, only the following HTML tags are supported:
<TOPIC NAME="msgid">
</TOPIC> This tag is only checked for when xhelp searches its
own message file; otherwise, it will be ignored.
<HTML> This must surround the text to enable HTML formatting.
</HTML>
<HEAD> Everything in here will be completely ignored.
</HEAD>
<BR> Start a new line.
<P> Start a new paragraph; xhelp will issue two line breaks.
Presently, no arguments are supported.
<TR> In "real" HTML, this starts a new row within a table; here,
a line break (like <BR>) is enforced. All other table tags
are ignored.
<HR> Horizontal rule.
<UL> Unordered list; each list element is introduced with
<LI> <LI>. No bullets are printed to introduce list
</UL> elements. Lists may be nested.
<UL> knows two arguments not used in HTML:
<UL FIRST=xxx NEXT=xxx>
FIRST specifies indentation for the first line of each
list element, NEXT for the following lines. "xxx" must
be specified in text-mode spaces. See the default help files
for examples.
<TAB> can be used within a list (as described above) to
jump to a predefined position. As for now, the only
"tab" defined is the NEXT position as described above.
xhelp uses this all the time for displaying a command
on the left, and the description of it on the right.
<B> Bold text; xhelp will display the enclosed text in
text the color specified in the environment variable
</B> "HELP.BOLD".
<B> Text in italics; xhelp will display the enclosed text in
text the color specified in the environment variable
</B> "HELP.ITALICS".
<A HREF= > Anchor; in "real" HTML, this defines a hyperlink.
text xhelp just highlights these with the color specified in
</A> "HELP.ANCHOR"; no further function is provided.
Highlighting only occurs when "HREF" is given.
<!-- Comments; will be ignored. This is helpful when
--> parsing "real" HTML files containing JavaScript.
<IMG> Images of any kind will be replaced with a
symbol in the color specified for text in italics.
ΓòÉΓòÉΓòÉ 5.7. Special Characters in HTML files ΓòÉΓòÉΓòÉ
Certain special characters sometimes need, sometimes can be described with the
use of special escape sequences: in HTML, all of these start with an ampersand
("&") and end with a semicolon (";").
The following list contains all HTML escape sequences that are supported by
xhelp (plus a few xhelp-specific ones).
As opposed to the rest of HTML, escape sequences are case-sensitive. Sequences
that are not recognizes by xhelp will be skipped without producing any output.
Please note the following in respect to codepages:
Not all characters can be displayed on your screen, depending on the
codepage you use. In the list below, mind the remarks made to certain
characters. See the OS/2 online reference for details on codepages.
xhelp supports both codepage 437 and 850; with OS/2 Warp 4 (or Warp 3
with ObjectREXX installed), it can detect the codepage on its own;
otherwise it will assume use of 437, since this seems to be more safe.
Characters that cannot be displayed with your current codepage will be
replaced by a character that comes close (e.g. a simple "Y" instead of
the Yen sign).
You might run into trouble when using "strange" codepages (other than 437
or 850, one of which should be supported on every computer), which I have
not tested. Adding "chcp 437" to your profile might help; see the OS/2
online reference for details.
I have omitted certain sequences that are supported by HTML, which I
considered not too important though or which are not supported by the standard
codepages. If you feel that something crucial to your language is missing,
please contact me.
REQUIRED escape sequences (for characters that have a special meaning in
HTML):
< open angle bracket ("<")
> closing angle bracket (">")
& ampersand ("&")
non-breaking space
The following characters are provided for compatibility when displaying "real"
HTML files; as opposed to with HTML browsers, their use is NOT required, since
the characters can be put into the text directly as well.
§
£ ╨¼
¥ ╨¡ %
¢ ╨½ %
¶
µ ╤å
« ╨╛
» ╨┐
½ ╨╗
¼ ╨╝
² ┬ñ
± ╤æ
¤
Notices: Characters marked with "%" are supported on codepage 437 only.
The following language-dependent special characters are both supported
directly as well as by the below escape sequences.
ä ╨ö *
ë ╨Ö * #
ï ╨¢ * #
ö ╨ñ *
ü ╨æ *
ß ╤ü
æ ╨í *
á ╨░ * #
é ╨Æ *
í ╨▒ * #
ó ╨▓ * #
ú ╨│ * #
à ╨ò * #
è ╨Ü * #
ì ╨¥ * #
ò ╨Ñ * #
ù ╨º * #
â ╨ô * #
ê ╨ÿ * #
î ╨£ * #
ô ╨ú * #
û ╨ª * #
ç ╨ù *
å ╨û *
ñ ╨┤ *
¡ ╨╜
Notices: Characters marked with "*" can also be capitalized (e.g. "Ü"
instead of "ü"); characters marked with "#" are, when capitalized, only
supported when using codepage 850.
The following are supported by xhelp only and are not part of HTML:
&larrw;
↝
&uarrw;
&darrw;
ΓòÉΓòÉΓòÉ 5.8. Known Limitations ΓòÉΓòÉΓòÉ
xhelp processes HTML messages on a mixed per-character/per-word basis. On
my Pentium-133 with Warp 3 installed, output speed is acceptable; I
presently have no access to slower computers. If you experience
terminally slow output, you can rewrite the help message files
(XHELPxxx.MSG) so that they do not use HTML output, which is WAY faster.
ΓòÉΓòÉΓòÉ 5.9. History ΓòÉΓòÉΓòÉ
1.64 Jan 1, 1998
--- New features:
Help files updated for xcp and watchdrv.
1.63 Dec 20, 1997
--- New features:
Support for different codepages added. Many more escape sequences.
Support for different languages via HELP.COUNTRY added.
Second, German help file CMD049.MSG provided.
Moved all help messages into CMD001.MSG.
Change for environment variables describing INF books: "help <var>" will
now look for environment variable HELP.<var> (instead of only <var>).
Environment variables HELP.COLOR, HELP.ANCHOR, HELP.BOLD, HELP.ITALICS
are now evaluated; default is now no coloring at all.
Help for OS/2 SYS/REX messages improved.
Adjusted for use with MLRXSHL's HELP.COMMAND variable.
--- Bugfixes:
Can now also handle non-OS/2 files that do not end their lines with
"0d0a"x (e.g. from UNIX).
1.62 Dec 14, 1997
--- New features:
"help list" will work without ObjectREXX too. Now displays both known
commands AND (new) all INF files on BOOKSHELF.
The message format has completely been reworked. xhelp now uses a subset
of the HTML syntax to display files and formats the output on-the-fly
according to the current screen size.
Added processing of external HTML and text files.
Added processing of text directly from the command line.
1.61 Dec 6, 1997
--- Initial release.
ΓòÉΓòÉΓòÉ 6. ln ΓòÉΓòÉΓòÉ
What's that?
Installation
Starting watchdrv / command line options
Known limitations
ΓòÉΓòÉΓòÉ 6.1. What's That? ΓòÉΓòÉΓòÉ
In the UNIX world, "ln" is a standard command for creating "links". Since most
UNIX filesystems do support links, this command really operates on the
filesystem, creating a directory entry as if a new file was created, which does
not point to a new file though, but to an existing file. This means you can
have several directory entries actually pointing to the same file.
Links are really helpful when organizing your directories. In OS/2,
unfortunately, they do not exist, at least not on the filesystem level (with
the exception of the "Toronto Virtual File System", TVFS, an IBM employee
written software, which does provide links). OS/2 does provide a similar
mechanism on the WPS level though: the well-known shadows. See the "What are
abstract WPS objects?" section for details on this.
"ln" now uses shadows to create links. In conjunction with "xdir", you can now
create and view shadows on the command line.
ΓòÉΓòÉΓòÉ 6.2. Installation ΓòÉΓòÉΓòÉ
ln is installed automatically by the installation script provided with this
package. It does not require anything special, although you should put it on
your PATH.
ΓòÉΓòÉΓòÉ 6.3. Starting ln / Command Line Options ΓòÉΓòÉΓòÉ
ln follows the syntax of the UNIX "ln" utility, although not all functions can
be implemented in OS/2 (e.g. there is no difference made between "soft" and
"hard" links).
Syntax:
ln [-<options>] <filespec> [<dir>]
with:
<filespec> the file to be linked; this can be a full path specification.
Wildcards ("*") are allowed.
<dir> This is the location where the link(s) shall be created
in. When not specified, the current directory is used.
Options:
-f "force" mode: replace existing links.
-v be verbose: show each file while linking.
Example:
ln G:\OS2\DLL\*.dll
will create shadows for all DLLs in the \OS2\DLL directory. The shadows will be
placed in the current directory. Use "xdir -W" to see them or open a WPS folder
(e.g. with the "open" command).
ΓòÉΓòÉΓòÉ 6.4. Known Limitations ΓòÉΓòÉΓòÉ
Not all UNIX options have been implemented yet; most of them don't make
sense with OS/2 anyway.
ln cannot handle filenames including spaces yet.
ΓòÉΓòÉΓòÉ 7. open ΓòÉΓòÉΓòÉ
open is a command for opening a directory as a WPS folder. Its syntax is
simple:
open [<dir>]
with <dir> being the directory to open. If <dir> is omitted, the current
directory is opened.
open is now (CommandPak V1.63) implemented as a CmdShl alias in the default
profile. It uses CmdShl's "CD" command to switch to the specified directory; as
a result, <dir> can be anything that "CD" understands, even a directory
specified with the CDPATH environment variable.
Example:
open \OS2
will open the OS2 directory on the current drive.
ΓòÉΓòÉΓòÉ 8. recurse ΓòÉΓòÉΓòÉ
recurse is a command for executing a given command line in every subdirectory
of the current directory. Its syntax is simple:
recurse [<cmdline>]
with <cmdline> being the command line to be executed in each subdirectory. If
<cmdline> is omitted, a help message is issued.
recurse is now (CommandPak V1.63) implemented as a CmdShl alias in the default
profile, following a suggestion by Martin Lafaix. This way, recurse can now
even use aliases and CmdShl built-in commands.
Example:
recurse ren -d *
will remove .LONGNAME extended attributes from all files in all current
subdirectories, provided that "ren" has been defined as an alias to xren.
Trouble is, with recurse being a CmdShl alias, pressing Ctrl+C during execution
will probably terminate the session due to a CMD.EXE bug.
ΓòÉΓòÉΓòÉ 9. watchdrv ΓòÉΓòÉΓòÉ
What's that?
Installation
Starting watchdrv / command line options
Known limitations
History
ΓòÉΓòÉΓòÉ 9.1. What's That? ΓòÉΓòÉΓòÉ
watchdrv (for "watch drive", obviously) is helpful when you insert and remove
CD-ROMs frequently.
watchdrv will monitor your CD-ROM drive and open the respective drive folder as
soon as you insert new media. You can even specify sounds that will be played
upon inserting and removing media.
watchdrv is not really a command-line utility since it best runs in a separate
session, but I thought it was useful in CommandPak's context anyway.
ΓòÉΓòÉΓòÉ 9.2. Installation ΓòÉΓòÉΓòÉ
watchdrv is installed automatically by the installation script provided with
this package. A program object is created.
watchdrv requires nothing special; you can put it anywhere. A location on the
PATH is recommended. For sound support, MMPM/2 is required though, since
watchdrv uses "play.cmd" in the /MMOS2 directory to play sounds.
watchdrv will happily run in the background when minimized.
You can put the watchdrv object into your startup folder to have watchdrv
started automatically when you boot OS/2.
watchdrv now (CommandPak 1.64) uses xhelp.cmd to display its messages, thus
using the language that was set in the HELP.COUNTRY environment variable. If
you have only set this variable in your profile, you might want to add a SET
HELP.COUNTRY=xxx to CONFIG.SYS; otherwise, watchdrv will only recognize your
language setting when started from within CmdShl.
ΓòÉΓòÉΓòÉ 9.3. Starting watchdrv / Command Line Options ΓòÉΓòÉΓòÉ
watchdrv recognizes a few command line options when started; most importantly,
the drive letter of your CD-ROM drive.
Syntax:
watchdrv [<drive>] [-t:<val>] [-si:<file>] [-so:<file>] [-i] [--play]
with:
<drive> being your CD-ROM drive (e.g. "L:"). This is not checked;
if you specify a harddisk here, watchdrv will wait forever,
since there will never be new media in there. Theoretically,
it is also possible to monitor floppy disks ("watchdrv a:");
trouble is that this makes the computer really slow, since
there is continuous mechanical activity on the disk drive.
If the drive is omitted, watchdrv will monitor the last
available drive (which, at least on non-network computers,
should be the CD-ROM drive).
Options:
-t:<val> This defines the frequency of drive checking in seconds.
The default is 2.
-si:<file> This defines the sound file to be played when media
is inserted. You must specify the full path to the sound file.
-so:<file> The same for when media is removed.
-i ignore media at startup; if not specified, watchdrv will
already open a folder at startup when media is inserted.
--play play audio CD-ROMs automatically (not implemented yet).
Example:
watchdrv L: -t:5 -si:G:\MMOS2\sounds\crash.wav
will check drive L: every five seconds and play a sound when media is inserted.
ΓòÉΓòÉΓòÉ 9.4. Known Limitations ΓòÉΓòÉΓòÉ
If the specified drive does not exist or is not removeable (e.g. when a
hard disk is specified), watchdrv will watch that drive forever.
The "--play" function (for playing audio CD-ROMs) is not working yet and
maybe never will. I've tried to implement it with the REXX multimedia
functions, but when calling these repeatedly, the machine becomes
terminally slow. If anyone has a better idea how to realize this, please
contact me.
watchdrv cannot auto-close folders when media is removed. Instead, OS/2
will annoyingly give error messages when you remove a CD-ROM from your
CD-ROM drive while its WPS folder is still open. The only thing watchdrv
can do is play a sound upon removing media ;-) so close your WPS folder
manually first before opening your CD-ROM drive.
ΓòÉΓòÉΓòÉ 9.5. History ΓòÉΓòÉΓòÉ
1.64 January 1, 1998
--- New features:
Language support added to watchdrv.cmd and XHELPxxx.MSG.
1.62 December 14, 1997
--- New features:
If drive is omitted, watchdrv will take the last available drive
automatically.
1.00 somewhere in september 1997
--- Initial release.