MIRA
Mira Extensions for the Bash Shell


Contents

Overview

MIRA provides several extension to improve the workflow when working in the console with a bash shell. Beside additional tools, these extensions enable awareness of MIRA package names and tab-completion for most of the mira command line tools.

To enable the bash extensions you need to add the following line to your ~/.bashrc file:

source /path_to_mira/scripts/mirabash

where path_to_mira need to be replaced by the correct path to your MIRA installation.

After restarting your console, tab-completion and additional tools are available. They will be described below.

miraindex

miraindex

This command can be used to update the index of MIRA packages, in order to allow automatic reference to and name completion for MIRA packages on the command line. In most cases the index will be updated automatically when using MIRA tools, but e.g. moving, renaming or removing directories manually can require explicit reindexing.

miramk

miramk <package>:<buildconfiguration> [make options]

Starts the build process of the specified package using the given build configuration (release or debug mode). Additional options can be given that are passed directly to the underlying make command.

Example:

miramk MyPackage:release -j5

miracd

miracd <package>[:path]

Change the working directory to the location of the target package. Optionally, a path relative to the package location can be given, e.g.

miracd MyPackage:include/

mirals

mirals <package>[:path] [options]

Lists contents of the given package directory. Optional options are the same as when using the 'normal' ls command.

miracp

miracp <srcpackage>:<srcpath> <destpackage>:<destpath> [options]
miracp <path> <destpackage>:<destpath> [options]
miracp <srcpackage>:<srcpath> <path> [options]

Copies files or directories between the specified packages paths or between a package path and a "normal" filesystem path, e.g.

miracp MyPackage:include/*.h /home/user/tmp

miraedit

miraedit <package>[:path] [options]

Opens the specified file in a text editor. In order to determine which editor to use, it will first check environment variable MIRA_EDITOR, then EDITOR. If neither of these is set, it will try to start programs gedit, kate and finally vi (must be found in the system PATH).

mirasvn

mirasvn <command> [<package> [<package> ...]] [--auth] [options]

Runs 'svn' for the specified packages or for all installed packages (if no package is specified).

General Options:

  --auth: query username and password just ONCE and use it for all calls to svn

Important commands:

    changes     - shows the changes on the server that were made since the last update
    status (st) - status of all branches that are listed in the index
    update (up) - update to latest revision
    commit (ci) - commit all changes (use with care!)

All other svn commands are supported too, type 'svn help' for a complete list.

Example: update packages MIRABase, MIRAFramework and MIRACenter to a specific svn revision:

mirasvn update MIRABase MIRAFramework MIRACenter --auth -r 1234