prwd (1) - Linux Manuals
prwd: universal shell prompt
NAME
prwd - universal shell promptSYNOPSIS
prwd [-aVhDESCRIPTION
] 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`'
AUTHORS
prwd was written by Bertrand Janin <b@janin.com> and is distributed under an ISC license (BSD compatible, OSI compatible).