Home : Gregor : Software : The Perl Shell (psh)
The Perl Shell is a shell that combines the interactive nature of a Unix shell with the power of Perl. The goal is to eventually have a full featured shell that behaves as expected for normal shell activity. But, the Perl Shell will use Perl syntax and functionality for control-flow statements and other things.
There are Perl Shell Announcements and Perl Shell Develpment mailing lists. These are now hosted by SourceForge. To be added, see the SourceForge web site.
SourceForge also has anonymous CVS access available if you want to track the bleeding edge of psh development.
Important features: "Manifest Filters" make simple filter writing easier; the Win32 port has been fixed and enhanced;Recursive globbing similar to zsh.
Refinements to the 0.005 code: A new delenv builtin is provided, and kill now takes multiple process IDs. Some more work has been done on I18N.
New Features:
$Psh::history_size if
Term::ReadLine::Perl is used.
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.
**/ (Example: grep anything **/*.pm).Win32 Port Enhancements:
execute_complex_command(), get_hostname(),
get_all_users(), get_home_dir(), and get_known_hosts().Internals:
File::Spec).$ENV{HOME} in portable code.A very functional release.
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.
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.
alias
Changed builtin alias so that 'alias name' displays the alias definition for that name.
bg
It's now possible to do 'bg commandname' (e.g. 'bg emacs')
fg has the same behaviour for consistency.
cd
Respects CDPATH now and sets OLDPWD.
@Psh::Completion::bookmarks and @Psh::Completion::netprograms.%Psh::Completion::custom_completions.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 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.FIGNORE environment variable now.Psh::OS::Unix::glob() - now uses its own glob routine instead of CORE::glob() - and is significantly faster (important for executable completion).$Psh::Prompt_cont, $Psh::result_array.psh into Psh, Psh::Builtins and Psh::Util.CURRENT_SHELL is set to the path to psh.print_list and abs_path.This version of the Perl Shell adds significant functionality. However, it is still a development release.
Thanks to the Perl Core team (in alphabetical order): Simon Huggins, Markus Peter, Omer Shenker and Glen Whitney for their excellent work leading up to this release.
A developer-only release leading up to 0.004
A developer-only release leading up to 0.004
Patches to 0.003 from Glen Whitney
Patches to 0.003 from Glen Whitney
This version of the Perl Shell adds significant functionality. However, it is still an early development release.
Extra special thanks to Markus Peter for his contributions to this release. Much of the new functionality is due to his efforts.
This patch added support for custom prompt variables, built-in functions cd, exit, and which, and a few other minor enhancements.
This patch fixes a problem with the prior patch, where `ls' was no longer treated correctly by smart mode, even though `ls -l' was. (Thanks to Jamie Kucab for catching this one).
This patch fixes a problem with smart mode, which prevented simple commands like ``$x=1'' from doing the right thing. (Thanks to Jamie Kucab for catching this one).
Copyright © 2010 Gregor N. Purdy. All rights reserved.