App::PS1 - Module to load PS1 status line elements
This documentation refers to App::PS1 version 0.07.
# in your ~/.bashrc file export APP_PS1='face;branch;date;direcory;perl;node;ruby;uptime' export PS1="\[\`app-ps1 -e\$?\`\]\n\u@\h \\\$ "
This is the engine for the app-ps1 command.
app-ps1
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
ps1
low
bw
theme
exit
cols
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
$name
parse_options ($options)
Parses the JSON $options txt.
Lots of environment variables are used to configure the command prompt
$APP_PS1
Sets the elements to be displayed (overridden by --ps1)
--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
There are no known bugs in this module.
Please report problems to Ivan Wills (ivan.wills@gmail.com).
Patches are welcome.
Ivan Wills - (ivan.wills@gmail.com)
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.
To install App::PS1, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::PS1
CPAN shell
perl -MCPAN -e shell install App::PS1
For more information on module installation, please visit the detailed CPAN module installation guide.