3.5. Mesh (Metaverse Shell)

3.5.1. Overview

Mesh is a command-line client for browsing and editing vobject structures. It is modeled after Unix command line shells and features line editing, command history and tab completion using the GNU readline library. It is intended to be useful for inspecting and interacting with vobjects for the purposes of learning about, editing, and debugging vobject structures.

Mesh takes the following optional command line arguments.


    Usage: mesh [-a] [-n NAME] [-s] URL
           mesh [-x] -c "COMMAND"
            -a            Use an avatar, send and recieve talk messages.
            -n NAME       Use NAME as your name with -a
            -s            Find service directory.
            URL           A 'vop:' URL to start at (default is local site).
     
            -c "COMMAND"  Execute COMMAND and exit. Separate multiple commands with ';'
            -x            Don't exit after executing COMMAND.
            -l            Listen on TCP port 1324 for commands.
                          WARNING: *anyone* can connect and execute commands in your mesh session (and in your shell)!!
            
The first URL specified on the command line will be current object when the shell starts. If no URL is supplied, then mesh will start at mesh's local site.

If support was compiled in, mesh can use the "readline" library to interactively read command input. If you have customized your readline config, it should be fully supported in mesh. For full readline documentation, including key bindings for cursor movement and history searching, consult your readline info page or manual. Some of the most useful keys are: TAB to attempt to automatically complete a Vobject URL in-line (aka tab completion); CTRL-A to go to the beginning of the line; CTRL-E to go to the end of the line; CTRL-L to clear the screen; CTRL-P or UP ARROW go to the previous line in the command history; CTRL-N or DOWN ARROW go to the next line in the command history; CTRL-R lets you search the command history.

3.5.2. Command list

mesh understands the following commands. You may separate multiple commands on one line by separating them with a semicolon (;). Normally all text following percent sign (%) is considered a "comment" and is ignored. To include a literal hash mark in your input, you must quote it with a slash (\%).

Browsing commands: cd, ls, parents, popd, pushd, sites, types, urls, walk

Object manipulation commands: addtype, create, insert, load, save

Property commands: property help, property read, property replace, property write

Other features: daemonize, echo, exit, help, listen, logfile, meshscript, msg, save, set, setlog, vopscript

addtype [type]

Add the supplied type string to the current object. Note: this adds the type string but will not extend the functionality of the object.

cd [newobject]

Change the current object

Aliases: go

See also: pushd, popd urls

create [name] [types...]

Create a new local object with the given name and zero or more types, as a child of the current object. If the Expat XML library was available when mesh was compiled, then required subobjects will be added for each type, based on info in OTDs (the OTDs should be installed in /usr/share/vos/otd).

Aliases: new

See also: insert

daemonize

Make mesh a non-interactive background process

Aliases: bg

See also: logfile, exit

echo [text]

Print text to standard output, followed by a newline.

exit

Exit the program

Aliases: quit, CONTROL-D

See also: daemonize

help

Print a list of available commands.

Aliases: h, ?

insert [name] [object URL]

Insert object as a new child of the current object with the given name.

See also: create

listen

Causes mesh to become a listener of the parents and children of the current object

load [file]

Load COD file [file] and insert objects under the current object. [file] may be a plain COD file or compressed with gzip.

See also: save

logfile [filename]

Redirect logging to specified output file

See also: setlog

ls

List children of current object

Aliases: dir, look

meshscript [scriptfile]

Run the supplied mesh script file

Aliases: ms

See also: vopscript

msg [user] [message]

Send message to a user (or any "talkative" object). This command is only available when you run mesh with the "-a" command-line options.

Variations: you can send a public message to all users in the current object with a single quote (') at the beginning of the line, and a reply to the last message sent to you with a double quote (") at the beginning of the line.

parents

List all parents of the current object

popd

Go to object on top of the history stack

Aliases: back

See also: cd, pushd, urls

property help

Display property commands.

property read

If current object is a property, print value and type.

property replace [value] [type]

If current object is a property, set new value and type.

property write [value]

If current object is a property, change value.

pushd [newobject]

Change current object, pushing previous object to the history stack

See also: cd, popd, urls

save [file]

Save the current object and children as a COD file named [file].

See also: load

set [setting] [value]

Change internal mesh settings. Run "set help" for more information.

setlog [channel] [level]

Changes log level of a particular channel

See also: logfile

sites

List all the presently known sites

types

List the type strings of the current object

urls

List all the known valid paths to the current object

Aliases: pwd

vopscript [scriptfile]

Run the supplied VOS script

Aliases: vs

See also: meshscript

walk

Print out every path descending from the current object