File Types

Warning

The file types used to represent commands and categories of commands by the Visual Shell are hideous. I fully intend to rewrite the entire application at a later date starting here.

Directory Layout

Due to heavy redesigning of VisualShell's architecture during implementation there are some strong dependencies on directory layout that are not needed in theory. This is will be among the major issues to address when producing the first alpha releases.

The Categories:Paths key of the users configuration holds a list of directories to look for commands in. When the Application class is initiated each of these directories is then searched for subdirectories corresponding to command categories. Each of these directories is expected to contain one "*.category" and possibly several "*.command" files.

Command Files

Command files are XML files with the following fields:

Name Description Input Usage
name. Used to provide a clear name for a command. Any string of characters, preferably one to three words of standard English. Single use, non-optional.
description. Used in providing further description of the command, currently in the form of a tool-tip. Any string of characters, preferably about one paragraph of standard English. Single use, non-optional.
path. Provides the path to the actual command or shell builtin. A command within the users path or the full path to an executable. Can be followed by arguments but that may lead to later complications. Single use, non-optional.
argument. Starts a section describing an argument to the command. See below. Multiple use, optional.

The Argument Section:

The Argument Field has the following sub-fields:

Name Description Input Usage
name. Gives the name of the argument. Any string of characters, preferably one or two words of standard English. Single use, non-optional.
description. Assigns a description of the arguments affects. Any string of characters, preferably a sentence or small paragraph of standard English. Single use, non-optional.
prefix. Used to give the detail the start of an argument within source code. A sequence corresponding to the prefix of an argument such as the '-o' part of 'gcc fooprog.c -o fooprog' Note that white space is interpreted as input for commands such as 'mv'. Single use, non-optional
type. Used to set the arguments type. Technically the argument is always textual but the user interface changes depending on the type.

Can take the form of one of the following:

switch

An argument that is either on or off such as gcc's -g flag.

integer

A purely numeric argument such as the -# argument for lpr.

string

An argument that consists of a series of arbitrary characters. One example is text given to echo.

file

An argument pointing to a file like the default argument passed to cat.

directory

An argument that is always a directory.

file-directory

An argument that is either a file or an argument such as the default argument passed to cd.

Single use, non-optional.
optional. Indicates whether the Argument is needed in order for the command to work. Can be set to either true or false. Single use, non-optional.

Category Files

As their name suggest Category Files are used to organise Commands into categories grouped by the way that they are used. Note though that Category Files only list commands by the name that the user sees.

Name Description Input Usage
name. Assigns a name to the Category. Any string of characters. Preferably one to three words of standard English. Single use, non-optional.
description. Used to give a description of what the categories commands are generally used for. Any string of characters, preferably a small paragraph of standard English. Single use, non-optional.
command. Links a command to the category The value of name in the commands "*.command" file. Multiple use, optional.