prwd - Man Page

universal shell prompt

Synopsis

prwd[-aVh]

Description

prwd is a replacement for your shell's PS1, it provides a simple templating language with commands to customize your prompt. prwd keeps your prompt consistent between shells, provides fast template commands to display contextual information such as hostname, path, current git/hg branch without an inordinate amount of slow shell scripting.

The command-line options are as follows:

-V

Show current version.

-h

Show usage.

-t template

Use the provided template instead of the one defined in the configuration file or the one defined in the environment variable PRWD. This is particularly useful for testing a new template. Use single quote (') around your template to avoid your shell to expand the $ variable.

-a

Outputs all the aliases starting with '$' as shell variable exports. The output from this command is meant to be used with eval in your .profile file, see section ALIAS VARIABLES in the prwdrc(5) manual for more detailed information.

Environment

prwd can read its template from a configuration file, a command-line parameters or the following environment variable:

PRWD

The template used to render your prompt. This value will override the default internal template and can be overridden by the configuration file.

Files

~/.prwdrc

defines all the configuration, overrides PRWD and the internal defaults. See prwdrc(5) for configuratiom syntax and parameters.

Setup

You'll need to place this line in your ~/.profile (your mileage may vary):

export PS1='`prwd`'

See Also

prwdrc(5), pwd(1), csh(1), ksh(1), sh(1), getcwd(3)

Authors

prwd was written by Bertrand Janin <b@janin.com> and is distributed under an ISC license (BSD compatible, OSI compatible).

Referenced By

prwdrc(5).

May 9, 2013