mtnopt(1)

mtnopt1

Generate shell variables from monotone workspace options

Usage

mtnopt [{-s | -c | -v}] [-d dir] [-k keys]

mtnopt -h

Overview

mtnopt prints shell variable assignments for each value in the file of monotone workspace options, _MTN/options, in the current directory. For instance, if _MTN/options contained this text:

database "/home/user/src/monotone.mtn"
branch "net.venge.monotone"
keydir "/home/user/.monotone/keys"

mtnopt would print:

MTN_database="/home/user/src/monotone.mtn";
MTN_branch="net.venge.monotone";
MTN_keydir="/home/user/.monotone/keys";

By default, mtnopt attempts to guess appropriate syntax from the value of the SHELL environment variable. This can be overridden with the -s and -c command‐line options.

Options

-s

Print variable assignments in sh(1) syntax.

-c

Print variable assignments in csh(1) syntax.

-v

Print only the values, with no indication of the corresponding option keys.

-d directory

Look for _MTN/options in directory, rather than in the current directory.

-k keys

Print assignments for only those options that match the egrep(1) regular expression keys.

-h

Print a help message and exit.

Releases

4 releases since Debian 6.0 (Squeeze); the text changed 1 time.

  1. 6.0
  2. 7–9

Bugs

mtnopt only looks in the current directory for the _MTN directory, so it will fail in a subdirectory of a workspace.

mtnopt should be aware of the set of possible options, rather than blindly printing whatever is in _MTN/options.

The behavior when there is no _MTN/options file to be found is less than helpful.

From monotone 1.1-9 in Debian 9 (Stretch). Parsed by carta from the page's man source.