\begindata{text,539630556}
\textdsversion{12}
\template{help}
\define{global
}
\chapter{Expert Level Commands to CUI

(Keyword: cui-expert)}


The \helptopic{CUI} expert level commands include all of the novice level 
commands, plus some additional commands.  The expert commands are presented in 
this section in alphabetical order.  They are functionally related in this 
way:


\description{Command to convert your mail from ReadMail to Messages/CUI 
format:  convert

Show what version of CUI you are using:  version

Alias command (to change the name of a CUI command):  alias

Command to store a message to a file on the File System:  store

File-handling commands:  cat, editfile, unlink, write, source

Printing commands: set printer, set fixprint, set rot13print

Set commands:  blind, chains, debug, editor, fixprint, headers, log, printer, 
prompt, rot13print, scriptmode, seenlast, whatmeworry

Command to show your options setting: show

Header filtering commands:  keep, omit

Commands for managing classification directories:  create, append, dappend, 
dirinfo, merge

Command to list the directories (bboards) to which you subscribe:  sublist

Commands to flag message captions or bodies: urgent, unurgent, flag, unflag, 
forgetflag

Release memory for other operations (esp. useful if you are using a PC):  free

Miscellaneous commands:  echo whenis}


The currently implemented expert level commands are:

\description{
"alias <commandname> <equivalent command(s)>" --  in effect, defines new 
commands for the CUI.  For example, typing "alias pq purge \\; quit" will 
define "pq" as a new command which is equivalent to typing the two commands 
"purge" and "quit".  Note the backslash preceding the semicolon; since 
semicolons are statement separators for the CUI, you must "escape" the 
semicolon (precede it with a backslash character) if you want it to be part of 
the alias body.  Also handy for defining abbreviations, as in "alias d 
delete".  Giving the alias command with no body removes the alias for an item, 
as in "alias foo" to remove the alias for "foo".  Note: aliases and expertise 
levels do not take effect at the CUI READ> prompt or the CUI SEND> prompt. 
 They are only available at the CUI> prompt. 


"append <n> <message directory>" -- copies the message numbered <n> into the 
named message directory for classifying mail and gives the message the current 
date and time so it will appear at the end of the message directory as a new 
notice.  If you supply the name of a non-existent directory, CUI will ask 
whether it should create the directory and if you say yes, will copy the 
current message into it.  The companion to append is "dappend," which does an 
append and deletes the message from the original directory.  Both commands are 
also available at the CUI READ> prompt (in browse or update mode), where they 
copy the current message if you do not give a number.  


"cat <full path to filename>" -- shows you the contents of a file, just like 
the UNIX "cat" command.  It is especially useful to users of CUI on non-Andrew 
workstations, where it provides a convenient way of viewing any file stored on 
Vice.


"convert"--converts your mail from ReadMail format into a format which can be 
read using CUI and Messages.  You should only give this command if you have 
been reading your mail with the ReadMail program in the past.  You only need 
give this command one time to convert your mail to Messages/CUI format; after 
that, you should use Messages or CUI to read your mail.  NOTE: if you convert 
now, you will lose any mail classes that you have established with ReadMail. 
 Nothing will happen to the mail messages themselves; they will simply come 
un-classified.  We are working on a way to convert the classifications, too, 
but it is not available yet.   See the help entry on \italic{convert} for more 
information.


"create <message directory> [parent message directory <filename or message 
number>]" --  creates a new message directory with the name given.  If you 
type "create" and the name of a directory, you will be prompted for the name 
of the parent directory under which the new directory should appear.  If you 
press Enter, the new directory will be created parallel to the "mail" 
directory.  If you give the name of an existing directory, such as "mail," the 
new directory will be created under that directory.  This allows you to 
establish subdirectories for mail classification, such as "mail.todo".  If you 
create a subdirectory, you will be prompt for whether you want to add a 
directory creation notice to the parent directory.  This notice will remind 
you the next time you read the messages in the parent directory that the new 
subdirectory exists and prompt you about whether you want to subscribe to it. 
 If you say no, no directory creation notice will be posted.  If you say yes, 
you will be prompted for the name of a file or the number of a message which 
CUI will insert as the body of the directory creation notice. 


"dappend <n> <message directory>" --  like "append" except that it also 
deletes the message from the original directory.  That is, "dappend" copies 
the message numbered <n> into the named message directory for classifying 
mail, gives the message the current date and time, and deletes the message 
from the original directory.  If you supply the name of a non-existent 
directory, CUI will ask whether it should create the directory and if you say 
yes, will copy the current message into it.   Also available at the CUI READ> 
prompt, where it copies the current message if you do not give a number. 


"dirinfo <message directory>" -- prints out information about the named 
directory, including its protection and the number of messages it contains. 
 You can give more than one directory name to this command.


"echo <text>" --  prints out the <text> argument on the terminal.  This is 
useful in CUI command scripts.


"editfile [<full path to filename>]" -- provides an editing window in which 
you can edit the file on the File System you specify.  Remember to supply the 
full pathname to the file you want to edit (the tilde or ~ is not usually 
acceptable from a non-Andrew workstation).  You can only use "editfile" to 
edit files that already exist.  If you want to create a new file, you should 
use the "write" command to create the file first and then use "editfile" to 
modify it.  For this command to be useful, CUI must call an editor that is 
appropriate for the type of machine you are using.  See the 
\italic{ \helptopic{cui-edit} } help file for information on how to set your 
editor correctly.  If you are on an Andrew workstation, CUI will insert the 
file you specify into a SendMessage window, which will not allow you to edit 
and save the file, so \italic{you should not use this command with a filename 
if you are using an Andrew workstation.

}
"flag <message number(s)> <flag string>" --  flags the bottom of the message 
body with the flag string you specify.  If the flag string is not already 
defined, CUI asks you if you want to create the flag.  When flagging more than 
one message, separate the message numbers with commas, but not spaces.  The 
flags remains until you remove it explicitly, either with "unflag" or "forget 
flag."  Each folder can have up to 32 flags, and the flag string can be up to 
16 characters.


"forgetflag <flag string> <folder>" -- removes the flag you specify from all 
the messages with that flag within the folder you specify.  "unflag" removes 
flags from individual messages.


"free" -- frees up memory by forgetting about messages and directories that 
you have already seen.  A side effect of using "free" is that it renumbers the 
messages when you start reading again, so if you have deleted and purged some 
messages, the numbering will reflect that those messages are gone.  This 
command is of most use to PC users of CUI.


"keep <list of message headers>" -- tells CUI which message headers to present 
when header filtering is on.  You may separate the headers in the list with 
etiher spaces or colons (but not both).  "Keep" is the counterpart of "omit" 
and both are discussed at greater length in the 
\italic{\helptopic{cui-filtering}} help file.


"merge < message directory1> <message directory2>" -- merges message directory 
1 into message directory 2 and deletes message directory 1.  If you merge a 
directory that you have ordered using "append" and "dappend," you will very 
likely lose your ordering because the messages from both directories will 
become ordered chronologically. 


"noturgent <message number(s)>"  -- removes the "U" from the numbered 
message's caption which has been previously maked using the "urgent" command.

"omit <list of message headers>" -- tells CUI which message headers to omit 
when header filtering is on.  You may separate the headers in the list with 
either spaces or colons (but not both).  "Omit" is the counterpart of "keep" 
and both are discussed at greater length in the 
\italic{\helptopic{cui-filtering}} help file.


"set blind on" -- causes CUI to send you a blind carbon copy of any message 
sent after this command is issued.  "set blind off" prevents blind carbon 
copies from being sent to you.


"set chains on" -- turns message chaining on.  With message chaining on, a 
number appears in the caption of related messages; all messages related to the 
same initial message have the same number.  "set chains off" removes the 
numbers.


"set debug <c cs cm m ms mm mp>" --  turns on debugging in the CUI and/or 
message server.  There are seven arguments; if fewer arguments are provided, 
the remaining arguments are set to zero.  Each of the arguments is simply an 
integer.  The "c" argument is the CUI code's debugging level.  The "cs" 
argument is the SNAP debugging level on the CUI end.  The "cm" argument is the 
ITC malloc checklevel on the CUI end.  The "m" is the message server code's 
debugging level.  The "ms" is the SNAP debugging level on the message server 
end.  The "mm" argument is the ITC malloc checklevel on the message server 
end.  Finally, the "mp" argument, if non-zero, will cause the message server 
to open a new\italic{ \helptopic{pipescript}} for its debugging output.  This 
is necessary because the way the message server is started normally can only 
send debugging output to console, which is rather slow when large volumes of 
information are being conveyed.


"set editor <editor name>" -- allows you to set or change the editor that CUI 
uses when you give the "edit" or "view" commands.  \italic{You should not use 
this command from an Andrew workstation.  }On a PC, you can use this command 
to override the setting that you have in the "runcui.bat" file (if you don't 
have that editor with you, for example, but have another one on your 
diskette).   


"set fixprint on" -- causes all subsequent messages you print (until you "set 
fixprint off") to be printed in fixed-width font.  The default font for 
printing messages is *not* fixed width, so if you want fixed-width font, you 
must use this.


"set headers on" -- turns header filtering on.  "set headers off" turns it 
off.   By default, header filtering is off.  See the help entry on 
\italic{\helptopic{cui-filtering}} for more information.


"set log <file name>" -- sends a copy of all of CUI's output to a file you 
specify.  This file will be opened and closed EACH TIME OUTPUT IS WRITTEN, 
because it is intended to be used in situations where scripts will grab the 
file out from underneath CUI, but this means you probably do NOT want to 
specify a file on the File Sytem, as it would be stored once on the File 
System for each line of output.


"set prompt <text>" -- sets the CUI prompt string to be whatever you want it 
to be, instead of the default CUI>.


"set printer <printer name>" -- sets your printer to be the one you specify. 
 All subsequent print requests submitted from the same CUI session will be 
sent there.  "set printer" also validates the printer name, informing you if 
you give an invalid name.  See the help on  \italic{\helptopic{printers}}  for 
printer names and locations.


"set scriptmode on" -- turns "script mode" on.  "set scriptmode off" turns it 
off.  In script mode, many routine messages are not printed on the terminal 
and interactions with the user are turned off (so, for example, the CUI READ> 
prompt will not appear).  By default, script mode is off, but if you use the 
"source <filename>" command to run a script, script mode is automatically 
turned on while the script is being executed.  See the section on 
Customization below for more information. 


"set rot13print on" -- causes all subsequent messages you print (until you 
"set rot13print off") to be descrambled (or scrambled) according to the net 
news rot13 scrambelling convention.


"set seenlast <n>" -- marks the message numbered <n> as the last one you have 
seen on a particular bulletin board.  If this command is given at the CUI 
READ> prompt, it marks the current message as the last one seen.  This allows 
you to quit the CUI session without losing the "new" status of messages you 
haven't read yet. 


"set whatmeworry on" -- tells CUI to ignore errors in the first part of a 
multi-line command (such as might be supplied from a file using the "source" 
command).  "Set whatmeworry off" tells CUI to attend to such errors. "Set 
whatmeworry" is intended primarily to make the bboard daemon get more work 
done when one file server is down but others are up.


"show" -- Shows you the current state of all of your "set" options.


"source <filename>" -- reads CUI commands from the named file.  You can place 
trailing comments in the lines of the source file if you precede the # comment 
character with a blank or tab.

 

"store" <n> <full path to filename>" -- stores the message numbered <n> into 
the named file.  Also available at the CUI READ> prompt (in browse or update 
mode), where it stores the current message if no number is given.  NOTE:  you 
cannot use the tilde (~) in the pathname; the message will not be stored if 
you do.


"sublist" -- shows a listing of all the bboards to which you subscribe, along 
with your subscription status to the left.  


"unflag <message number(s)> <flag string>" -- removes the flag you specify 
from the message you specify. 


"unlink <full path to filename>" --  delete, permanently, a file on the File 
System. 


"urgent <message number(s)>" -- causes the numbered message's caption to be 
displayed with a "U" in it.  The "U" remains until you remove it with 
"noturgent."


"version" -- prints out the version numbers for the various components of the 
Andrew Message System.  In particular, it will print out the CUI version 
number, the message server version number, the AMS version number which which 
the CUI was compiled, the AMS version number with which the message server was 
compiled, the SNAP version number with which the CUI was compiled, and the 
SNAP version number with which the message server was compiled.  (The AMS 
version number is the version number relating to information structures which 
are shared between the message server and its clients; the SNAP version number 
is the version number for the remote procedure call mechanism, which is known 
as SNAP.)


"whenis <date text>" --  parses any text you give it as a date and prints out 
the date specified in a standard format.  This can be used to find out in 
advance, for example, what the "epoch" command will make of a complex date 
specification.  CUI uses Leonard Hamey's amazing date parser, and can make 
sense of an amazing range of date formats, but often in somewhat non-intuitive 
ways.  Purging bboards, for example, is done with the date specification 
"First before one month ago", which translates into the first day of last 
month.


"write <full path to filename>" -- stores what you type into the file 
specified by the full pathname.  Type a Ctrl-d  (Ctrl-z on the PC) when you 
are finished typing the contents of the file; CUI will write the file when it 
receives the Ctrl-d (or Ctrl-z).  NOTE: you cannot use the tilde (~) in the 
pathname; your file will not be written if you do.


}\section{Related Tools}


Select (highlight) one of the italicized names and choose "Show Help on 
Selected Word" from the pop-up menu to see the help document for:


\italic{\leftindent{\helptopic{CUI}}}\leftindent{

\italic{\helptopic{cui-wizard}}                 Wizard-level commands in CUI 

\italic{\helptopic{cui-filtering}}                How to do header filtering

\italic{\helptopic{cui-classification}}       Classifying messages with CUI 

\italic{\helptopic{cui-edit}}                      Using a text editor from 
within CUI

\italic{\helptopic{cui-customization}}      Customizing CUI via the .cuirc 
file

\italic{\helptopic{cui-preferences}}         Preferences that affect CUI

\italic{\helptopic{cui-quickref}}               Quick reference list of all 
CUI commands}


\begindata{bp,537558784}
\enddata{bp,537558784}
\view{bpv,537558784,1541,0,0}
Copyright 1992 Carnegie Mellon University and IBM.  All rights reserved.

\smaller{\smaller{$Disclaimer: 

Permission to use, copy, modify, and distribute this software and its 

documentation for any purpose is hereby granted without fee, 

provided that the above copyright notice appear in all copies and that 

both that copyright notice, this permission notice, and the following 

disclaimer appear in supporting documentation, and that the names of 

IBM, Carnegie Mellon University, and other copyright holders, not be 

used in advertising or publicity pertaining to distribution of the software 

without specific, written prior permission.



IBM, CARNEGIE MELLON UNIVERSITY, AND THE OTHER COPYRIGHT HOLDERS 

DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 

ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT 

SHALL IBM, CARNEGIE MELLON UNIVERSITY, OR ANY OTHER COPYRIGHT HOLDER 

BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 

DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 

WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 

ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 

OF THIS SOFTWARE.

 $

}}\enddata{text,539630556}
