<type>documentation</type>
<domain>oscommands</domain>
<id>properties</id>
<title>Sharing Projects with OS Commands</title>
<date>$Date: 2006-05-26 17:43:42 -0400 (Fri, 26 May 2006) $</date>
<version>$Revision: 13128 $</version>
<product>pro+</product>

By default OS Commands are stored in the ``*.wpr`` branch of the project file, which in
Wing Pro may be checked into a revision control system or otherwise shared with other
users and hosts. If the project will be used on different OSes or differently configured
systems, some extra work may be needed to configure the same OS Commands to work properly
on each host.

**Using Environment in Configuration**

The best option to manage OS Commands shared across different environments is to use
environment variable references in the OS Command's properties. Environment variables used
in OS Commands can be defined differently by each user of the project in `Project
Properties <ref:proj/project-properties>`__. Because these are stored in the per-user
``*.wpu`` branch of the project file (and not the shared ``*.wpr``) the values can differ
for each host on which a project is used.

For example, instead of specifying ``bash -norc`` for a *Command Line* style command, the
environment variable ``USERSHELL`` could be set in the ``Environment`` in `Project
Properties <ref:proj/project-properties>`__ to the user's preferred shell, and then the OS
Command could reference that value with ``${USERSHELL}``.

Environment variables can also be defined for directories used as the ``Initial
Directory``, in the ``Python Path``, or for any other value needed for any of the other
properties of an OS Command.

In addition to referencing user-defined environment variables, OS Commands may reference
any of the special environment variables listed in `Environment Variable Expansion
<ref:proj/variable-expansion>`__.

**Storing OS Commands Locally**

Another option to keep some OS Commands out of the shared ``*.wpr`` branch of the project
is to mark them as ``Shared`` in their configuration. This causes them to be stored in the
`User Settings <ref:install/user-settings-dir>`__ directory and not the project file. Thus
they will be omitted from the ``*.wpr`` that is commited to revision control.

**Storing OS Commands in the Per-User Project File**

In Wing Pro, it is also possible to reconfigure a project to cause all the OS Commands in
the project to be stored in the user-specific ``*.wpu`` branch of the project file. This
is done by removing ``console.toolbox`` from the ``proj.shared-attribute-names`` property
in the ``*.wpr`` file, as described in more detail in the section "Changing Which Properties
are Shared" in `Sharing Projects <ref:proj/project-types>`__.

