swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax     Other Library Functions  
function  

command-line

 
 

Library: Process execution (OMPROCESS)
Import: omprocess.xmd
Return type: command-line-type

Returns: Command-line object representing the provided STRING argument.


Declaration

export command-line-type function
        command-line              value string c-line
                     with-parsing value switch parsing optional initial { true } 

Argument definitions

c-line
is the command-line string to be processed
parsing
indicates whether or not the command-line should be split into whitespace-delimited components


Purpose

The command-line function takes a full command-line in string form, and builds a representation of that command-line that can be used to launch a process using the execute function.

The optional parsing argument can be used to guide OmniMark into breaking up the components of the command-line into individual pieces. If the argument is true (the default when it is left unspecified), quoted strings in the command-line are processed as follows:

  1. Any whitespace character is escaped if it appears within a sequence delimited by a pair of matching quote characters (either single or double).
  2. The matching quote characters referred to above are removed.
  3. The resulting string is split on any remaining, unescaped whitespace.

If the argument isfalse, the command-line is not processed. Loosely speaking, true corresponds to how most Unix shells parse their command-line. However, note that command-line processing is ultimately platform-dependent. Use of the command-line function can yield different results on different platforms, once the returned value is passed on to the execute function.

    Related Syntax
   omprocess-version
   executable-name
   execute
   glob
 
  Other Library Functions
   command-line
   executable-name
   execute
   glob
   omprocess-version
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:27:39 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.