Ivan Wills
and 1 contributors

NAME

App::PS1 - Module to load PS1 status line elements

VERSION

This documentation refers to App::PS1 version 0.07.

SYNOPSIS

   # in your ~/.bashrc file
   export APP_PS1='face;branch;date;direcory;perl;node;ruby;uptime'
   export PS1="\[\`app-ps1 -e\$?\`\]\n\u@\h \\\$ "

DESCRIPTION

This is the engine for the app-ps1 command.

SUBROUTINES/METHODS

new ( $param_hash )

Param: ps1 Str What plugins to show on the prompt Param: low Bool Use low (16 bit colour) Param: bw Bool Don't use any colour (black and white) Param: theme Str Use colour theme Param: exit Int The last program's exit code Param: cols Int The number of columns wide to assume the terminal is

Return: App::PS1 - A new object

Description:

sum ( @list )

Adds the values in list and returns the result.

cmd_prompt ()

Display the command prompt

parts_size ()

calculate the size of the prompt parts

load ()

Load plugins

surround ()

Surround the text with brackets

colour ($name)

Get the theme colour for $name

parse_options ($options)

Parses the JSON $options txt.

DIAGNOSTICS

CONFIGURATION AND ENVIRONMENT

Lots of environment variables are used to configure the command prompt

$APP_PS1

Sets the elements to be displayed (overridden by --ps1)

Default 'face;branch;date;directory;uptime',

$APP_PS1_THEME

Sets the colour theme for the prompt

  • default

  • green

  • blue

Default 'default',

$PS1_COLS

If Term::Size::Any is not installed you can configure the width of your screen by setting this parameter.

Default 90,

$UNICODE_UNSAFE

If set to a true value this will allow UTF8 characters to be used displaying the prompt

Default not set

$APP_PS1_BACKGROUND

Set the line's background colour

Default 52

DEPENDENCIES

INCOMPATIBILITIES

BUGS AND LIMITATIONS

There are no known bugs in this module.

Please report problems to Ivan Wills (ivan.wills@gmail.com).

Patches are welcome.

AUTHOR

Ivan Wills - (ivan.wills@gmail.com)

LICENSE AND COPYRIGHT

Copyright (c) 2011 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW, Australia 2077) All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.