ARPUS/ce, Version 2.6.2 (03/10/05) (SCCS 1.3)
_______________________________________________________________________________
prefix '<string>'
"Set Scan Prefix"
DESCRIPTION:
'prefix' is a special command which modifies the way data being
written to the transcript pad in a ceterm is processed. <string>
is a set of one or more characters to be looked for at the start
of each line written to the transcript pad. If a match is found,
the rest of the line is assumed to be Ce commands and executed
instead of being put in the transcript pads.
NOTE: Prefix is not active in vt100 emulation mode.
If multiple 'prefix' commands are executed, a stack of prefixes
is created. All the prefixes are tested. Thus if
"prefix'xxxx';prefix'yyyy'" were executed, lines starting with
either xxxx or yyyy would be assumed to be Ce commands.
If a prefix command is executed with no parameter or a null
parameter the top prefix test in the stack is eliminated. Thus in
the previous example, if "prefix" were executed, the "prefix
'yyyy'" would be undone leaving only the xxxx prefix.
DEFAULT PREFIX:
By default, when a ceterm is initialized, a prefix string of
0x0202 is assumed. This is a string of 2 characters with the hex
value 02. Executing a prefix command with no arguments will
eliminate this feature.
USING PREFIX:
There are two interesting uses to this feature.
A program other than the shell can be run from a ceterm. If this
program is "Ce aware", it can use the xdmc program to run the
prefix command and then pass Ce commands in it's stdout
intermixed with normal output. The prefix command could also be
executed using the -cmd option to ceterm when the program is
fired up or from the ceterm.cmd X resource. See the -name option
in the xresource help file for more ways of doing this. The Ce
aware program could also just make use of the default prefix
string.
The default prefix could be used in the users prompt to pass
information concerning the current working directory to ceterm
from the shell. This allows the ceterm process to track the
working directory in the shell and thus make clicking on a file
name work seamlessly without reverting to building an alias for
the cd command.
For example:
execute the Ce command: kd ^2 er 02 ke
This makes <ctrl>-2 enter a hex 02.
Then in your .profile set PS1 to:
PS1="xxcd \$PWD
Unix: "
export PS1
Where instead of typing x's you would type <ctrl>-2. This will
set the ksh prompt. It will put a cd to the current working
directory in each prompt line with instructions for ceterm to
pull this out and do the cd. This is probably the best way of
keeping the working directory for the Ce command window and the
shell window in sync.
The author of this help page uses the following prompt:
PS1="cd \$PWD
$OS[$HOSTNAME]: "
PS2="More: "
export PS1 PS2
A few things to remember. If you set the prompt this way in your
.profile, .dtprofile, .vueprofile, or .kshrc file, make sure you
export PS1. Also, when using a .kshrc file, make sure that in
your .profile, .dtprofile, or .vueprofile, you have the line:
ENV=$HOME/.kshrc ;export ENV
This is what tells the ksh to look at .kshrc!
RELATED HELP FILES:
sp (Set Prefix)
xresources (Arguments and X resources)
support (customer support)
_______________________________________________________________________________
Copyright (c) 2005, Robert Styma Consulting. All rights reserved.