Ivan Wills
and 1 contributors

NAME

app-ps1 - Command prompt generator

VERSION

This documentation refers to app-ps1 version 0.07.

SYNOPSIS

   app-ps1 --quick-start
   app-ps1 -e $? [--256|--16|--2] [(--ps1|-p) 'semicolon-separaged-list']

 OPTIONS:
  -p --ps1[=]str    The prompt string (Default $ENV{APP_PS1} || 'face;branch;date;directory;uptime')
                    Values:
                        branch - Show the Git, SVN or CVS branch of the current directory (if any)
                        date - the date and time of when the prompt is displayed
                        directory - Info about the current directory (name, subdirs, files disk usage)
                            abreviate - Abreviate parent directories to one character if true
                            dir - If set to false turns off directory count
                            file - If set to false turns off file count
                            size - If set to false turns off directory size
                        face - Happy face if last command exited with 0 sad otherwise
                        node - Current nodejs version if using nvm or nave
                        perl - Current perl version if using perlbrew
                        processes - Info about the current processes
                        ruby - Current ruby version if using rvm
                        uptime - Current system uptime
                    Options:
                        After each value you can specify a JSON object where you can configure further
                        options eg directory{"abreviate":true};uptime
  -e --exit[=]str   Last program's exit code (needed for face)
  -q --quick-start  A quick start helper
     --256          Show colours for 256 colour terminal (Default)
     --16           Terminal only supports 16 colours
     --2            Terminal does no support colour

  -v --verbose       Show more detailed option
     --version       Prints the version information
     --help          Prints this help information
     --man           Prints the full documentation for app-ps1

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

DESCRIPTION

SUBROUTINES/METHODS

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.