psst - prompt string setting tool
version 0.09
In ~/.bashrc add
# XXX: set up PATH and PERL5LIB as necessary # Set shell and environment variables and create a function for # prompt updating eval "$( psst prompt "$PS1" )"
Then use local::lib as normal, by whatever means.
This script is intended to run during the login profile. It ought to be reliable and failsafe, lightweight and require minimal early configuration.
Configuration goes in ~/.psst.yaml and should consist of key/value pairs for one hash (dictionary). It is entirely optional, but can only be read if YAML is installed.
Write the base value for $PS1 here to avoid the need to pass it to each call to psst prompt.
psst prompt
If present, should be a list of [ $text, $replacement ] pairs. These are applied in order to the $PERL_LOCAL_LIB_ROOT by Bash, after being munged into a set of Bash Variable Substitutions.
[ $text, $replacement ]
$PERL_LOCAL_LIB_ROOT
Author reserves the right to turn this into the Portable Sanity Support Tool by adding other subcommands. A symlink-farm in ~/bin/ is a likely next target.
~/.psst.yaml is the configuration file, taking ~ from %ENV.
~
%ENV
Copyright (C) 2011 Genome Research Limited
Author Matthew Astley mca@sanger.ac.uk
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install App::psst, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::psst
CPAN shell
perl -MCPAN -e shell install App::psst
For more information on module installation, please visit the detailed CPAN module installation guide.