-- CommandDoc.tioga
-- This file same as SourceDoc.tioga
-- last edited by: L. Stewart, December 12, 1983 5:21 pm
name Command:, Source:
syntax
Command
Source
Create a new, independent, command tool.
Command file
Source file
Create a nested command tool which will execute commands from the command file file. If file cannot be found, then file.cm is tried. If file is not a full path name, then the command tool will try the current working directory and all directories on the command tool search rules.
Command file arg1 arg2
Source file arg1 arg2
Run the command file file with the "arguments" arg1 arg2 . . . Arguments to a command file can be gotten from commands inside that command file by use of the formal arguments $1, $2, etc.
description
Create a new Command Tool or run a command file. Nested instances of the command tool tend to use some number of '> characters as a prompt in order to indicate the depth of nesting.
The source command does not copy the process and command tool property lists, so that commands run from a "source" can change the properties seen by the command tool which invoked the source. A ChangeWorkingDirectory in a command file run with "Cmd" does not persist, but a ChangeWorkingDirectory in a command file run with "Source" holds its effects.
examples
Suppose the file Test1.cm contains "Date\nCommander Test2.cm\n" and Test2.cm contains "User\n":
% Command Test1
> Date
November 1, 1983 6:43 pm
> Command Test2.cm
>> User
User: Stewart.pa
%
warnings
There are doubtless many bugs. A careful reading of CommandToolDoc.tioga will answer many questions.
Don't type Command&, it doesn't do anything useful. Actually, it directs the error streams to the new window that gets created, which isn't that useful.
Suppose the file Test3.cm contains "Command Test3.cm\n":
% Command Test3.cm
> Command Test3.cm
>> Command Test3.cm
>>> Command Test3.cm
>>>> Command Test3.cm
>>>>> Command Test3.cm
>>>>>> Command Test3.cm
...Aborted

%
You are well advised to click the STOP! button! There are no safety checks for this one.
stop/undo
Click STOP! in the Command tool viewer.
implementation
CommandTool.df, especially CommandToolImpl.mesa
contact
L. C. Stewart <Stewart.pa>
keyword hints
Command processor, CLI, Shell, Executive
keywords
to be supplied by the Index Czar