Viivi Argument-Commands < Customization < Viivi's Cell < Entrance
In general when a program is booted from the terminal/CMD window,
the strings provided following to the program name are called as "command-line options".
Viivi interprets them in a positive way as "commands given as the arguments"
and call them especially as "argument-commands".
The argument-commands are used to specify the contents of works
(property settings, specifying I/O-targets, and etc.)
to Viivi.
For example, when Viivi is booted by the command-line as
$ viivi -K -E 1 -callcc -o result.out -i sheepAndWolf.scm
in the terminal window
(where
$
is the shell prompt),viivi
-K
-E 1
-callcc
-o result.out
-i sheepAndWolf.scm
is the argument-command (and its parameter).
Each argument-command always begins with a hyphen
-
,
followed by a string composed with one or more characters.
An argument-command is used alone or with one parameter, depending on its kind.
Each of the argument-commands and the parameters needs to be separated with space-characters.
Being given with multiple argument-commands,
Viivi processes them sequentially in the provided order.
When the argument-commands get longer,
it becomes more painful to type them on the command-line
every-time booting Viivi.
Due to the restriction in some OS/shell on the total-length of the command-line,
it is sometimes impossible to type long argument-commands.
In order to be able to provide argument-commands easily and reliably to Viivi,
a method is prepared to hand the argument-commands in a file.
First, describe the argument-commands in a file.
Then use the argument-command
"-a
"
to hand it to Viivi.
For example, the file
myArgCmds.vacs
including argument-commands can be specified as
$ viivi -K -a myArgCmds.vacs⮠ to boot in the kernel-mode
$ viivi -G -a myArgCmds.vacs⮠ to boot in the IDE-mode
A file like
myArgCmds.vacs
is called as "an argument-command script file".
The filename extension
.vacs
is an abbreviation for
"Viivi argument-command script".
As this method can be used both for the kernel-mode and for the IDE-mode,
don't write any argument-commands specifying the user-interface mode
such as
-K
or
-G
in the argument-command script file.
The argument-command script file has a free format.
Arbitrary space-characters and new-line-characters
can be inserted in the file.
In addition, the part from a
#
-character
to the end of the line is ignored as a comment.
The following three argument-command script files are equivalent to each other.
Here we show the file contents with a filename-title and line-numbers.
For example, the contents of the file
myArgCmdsA.vacs
is just the line
-E 1 -callcc -o result.out -i sheepAndWolf.scm
:::::::::::::::::::::
:: myArgCmdsA.vacs ::
:::::::::::::::::::::
1: -E 1 -callcc -o result.out -i sheepAndWolf.scm
2:
:::::::::::::::::::::
:: myArgCmdsB.vacs ::
:::::::::::::::::::::
1: -E 1
2: -callcc
3: -o result.out
4: -i sheepAndWolf.scm
5:
:::::::::::::::::::::
:: myArgCmdsC.vacs ::
:::::::::::::::::::::
1: # myArgCmdsC.vacs
2: # my argument-command script version C
3: # Example of an argumnet-command script file
4: #
5: # Author: ilma
6: # Date: 2022/02/22 22:22:22
7:
8: ###############
9: # preparation #
10: ###############
11: # one-argument for eval-call
12: -E 1
13: # enable call/cc symbol
14: -callcc # call-with-current-continuation
15:
16: ###############
17: # output file #
18: ###############
19: -o result.out
20:
21: ###############
22: # source file #
23: ###############
24: # sheep-and-wolf problem
25: -i sheepAndWolf.scm
26:
27: # end of file
28:
When Viivi is booted as
$ viivi -G -E 1 -callcc -o result.out -i sheepAndWolf.scm
or
$ viivi -G -a myArgCmdsA.vacs
the argument-commands are automatically analyzed
and displayed in the argument-command window
#<argument-command-window>
of Viivi IDE
in the format of
myArgCmdsB.vacs
.
When Viivi IDE is in the initial or finished state,
user can provide argument-commands through the argument-command window
#<argument-command-window>
:
One approach is to edit manually in the argument-command window.
The other approach is to load an external argument-command script file
into the argument-command window using the pop-up menu.
Command-line options for JVM,
such as those provided in the Viivi boot-up files
(e.g.,
specifications for the memory assignments
-Xss512m -Xms1024m -Xmx2048m
),
are concerning to JVM building
and processed ahead of the main body of Viivi
-jar Viivi.jar
They are not direct commands to Viivi.When Viivi is booted-up, the processing is done in the order as follows:
.viivirc
,
viivi.vcnf
, and
viivi.ide.vcnf
)
The processing of 1. and 2. are executed only once when Viivi is booted-up.
When the argument-commands are executed repeatedly in Viivi IDE,
the processing of 1. and 2. are not executed.
All the argument-commands are summarized here:
List of Viivi Argument-Commands
Viivi Argument-Commands < Customization < Viivi's Cell < Entrance
Exhibited on 2022/03/02
Copyright(C) 2003-2022 ilma <ilma@viivi.io> All rights reserved.