Refinements to 0.005.
New Features:
New builtin delenv.
Builtin kill accepts multiple PIDs.
Saving the history file now respects $Psh::history_size if Term::ReadLine::Perl is used
$Psh::history_size
Term::ReadLine::Perl
Manifest Filters for pipeline code, e.g. try:
ls | s/y/k/ # Substitution. Example is a Y2K fix. ls | { print ++$i, ": $_"; }q # Quick. Iterate over lines. netstat | { $_[1]>2; }g # Grepish. Print line if { ... } evaluates to true.
See the psh documentation for more information.
New recursive globbing using **/ (Example: grep anything **/*.pm).
**/
grep anything **/*.pm
Win32 Port Enhancements:
It now works. 0.005 was missing a couple of patches.
Makes use of system registry.
Implementations of execute_complex_command(), get_hostname(), get_all_users(), get_home_dir(), and get_known_hosts().
execute_complex_command()
get_hostname()
get_all_users()
get_home_dir()
get_known_hosts()
Internals:
Moved prompt code and perl evaluation code into own packages.
Implementing redirects and pipes in psh.
Clean-ups for all code using filenames (now using File::Spec).
File::Spec
More I18N.
Removed usage of $ENV{HOME} in portable code.
$ENV{HOME}
A very functional release.
brace
fallback_builtin
Builtins of this type (currently searched in package Psh::Builtins::Fallback) will be executed AFTER no program of that name was found. This allows simulation of common commands like ls and env on systems not having such binaries.
Psh::Builtins::Fallback
auto_resume
builtin
env
On systems with an env binary installed it will use the binary, on other systems (namely Win32) it will print a list of environment variables.
help
unalias
alias
Changed builtin alias so that 'alias name' displays the alias definition for that name.
alias name
bg
It's now possible to do 'bg commandname' (e.g. 'bg emacs') fg has the same behaviour for consistency.
bg commandname
bg emacs
cd
Respects CDPATH now and sets OLDPWD.
CDPATH
OLDPWD
Added portability infrastructure.
Working Win32 port (though it has limited features).
Variables for bookmark completion are now @Psh::Completion::bookmarks and @Psh::Completion::netprograms.
@Psh::Completion::bookmarks
@Psh::Completion::netprograms
New Perl Hashkey completion will TAB complete the name of keys for Perl hashes (if they are not written in quotes).
Support for user defined completions by %Psh::Completion::custom_completions.
%Psh::Completion::custom_completions
Perl Symbol completion now supports package names and package name completion.
Support for TAB completions for builtins.
A custom_completions entry may now also be code. If the value of a custom_completions key/value pair is a sub that sub will be called and the result used as rules.
custom_completions
sub
A rule for custom_completions may now have an optional third argument. If that argument is true, the custom_completion will replace the standard completions instead of adding to them.
custom_completion
Filename Completion respects the FIGNORE environment variable now.
FIGNORE
Documentation updates.
Locales defined for: Default (English), French, German, Italian, Portuguese, and Spanish.
New fallback builtins: ls
Prompt evaluation is now more bash compatible and handles even more complex prompts.
Replaced Psh::OS::Unix::glob() - now uses its own glob routine instead of CORE::glob() - and is significantly faster (important for executable completion).
Psh::OS::Unix::glob()
CORE::glob()
New variables: $Psh::Prompt_cont, $Psh::result_array.
$Psh::Prompt_cont
$Psh::result_array
Moved almost all code from psh into Psh, Psh::Builtins and Psh::Util.
psh
Psh
Psh::Builtins
Psh::Util
Environment variable CURRENT_SHELL is set to the path to psh.
CURRENT_SHELL
Generation of weekday names.
Small fixes for setenv, print_list and abs_path.
Fixed signal description generation.
This release fixes bugs, refactors the code, and adds the following features:
Background process management much more like bash.
Perl code in addition to executables may be put in the background.
Pipelines.
Initial internationalization.
New built-ins: alias, export, setenv.
export
setenv
A flexible set of evaluation strategies that can be selected or reordered by setting a configuration variable.
Prompt strings can have escapes like \07 (ASCII BEL) or \10 (ASCII LF).
\07
BEL
\10
LF
avoided trying to save history if there wasn't even a ReadLine module.
ReadLine
added $psh::debugging variable to hold the debugging state, so it can be turned on and off in a running psh.
$psh::debugging
A $psh::echo variable to control whether perl results of evaluation are printed.
$psh::echo
The which builtin now shows which strategy will apply to a given command line
which
Grab more input automatically if <<BLOCK appears anywhere on the line, or if the line ends with an open brace.
<<BLOCK
results of &psh::which() searches are hashed.
&psh::which()
Thorough documentation of every user-accessible variable and function
Contributions from Markus Peter:
Rudimentary background jobs handling and job management.
Signal handling.
Filename completion.
Updates to history handling.
Flexible %built_ins mechanism for adding built-in functions.
%built_ins
Smart mode is on by default.
Changed prompting to pass prompt string into &iget(), which passes it on to &Term::ReadLine::readline() or prints it out if the ReadLine module is not available. Thanks to Sam Tregar and tmb at lumo.com.
&iget()
&Term::ReadLine::readline()
Changed history handling so that empty lines and those consisting of entirely whitespace are not recorded.
Fixed a couple of typos.
Changed the regular expression for `smart mode' to allow vi +3 psh in addition to ls -l.
vi +3 psh
ls -l
Now uses Getopt::Std for option processing.
Getopt::Std
Fixed the code that detects the presence of Term::ReadLine.
Term::ReadLine
Made more use of debug mode to print out advisory information.
Use zero instead of undef to set Term::ReadLine::MinLine so that we don't get undef usage trouble in the guts of Term::ReadLine::Gnu.
undef
Term::ReadLine::MinLine
Term::ReadLine::Gnu
Added a bunch of stuff to the TODO file.
TODO
Added parens around each part of the $interactive detection expression.
$interactive
Prompt variables are now dealt with via %prompt_vars, which can be modified, so that custom prompt variables can be created.
%prompt_vars
Added %built_ins.
Fixed typo that caused a bug where prompt variable $ didn't work. Thanks to John Labovitz.
$
Patch.
Second release.
Initial release
To install Psh, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Psh
CPAN shell
perl -MCPAN -e shell install Psh
For more information on module installation, please visit the detailed CPAN module installation guide.