zoid1p
A modular perl shell
Usage
zoid [options]
[-]
[files]
Overview
Zoidberg provides a modular Perl shell written, configured, and operated entirely in Perl. It aspires to be a fully operational login shell with all the features one normally expects. But it also gives direct access to Perl objects and data structures from the command line, and allows you to run Perl code within the scope of your commandline. Although Zoidberg does not do the language interpreting itself -- it uses perl to do this -- it supplies powerful language extensions aimed at creating an easy to use interface.
By default zoid runs an interactive commandline when both STDIN and STDOUT are terminal devices, or reads from STDIN till End Of Line and execute each line like it was entered interactively. When an action is specified by one of the commandline options this will suppress the default behavior and exit after executing that action. If any file names are given, these will be interpreted as source scripts and suppress default behavior. Be aware that these source scripts are expected to be Perl scripts and are NOT interpreted or executed the same way as normal input.
This document only describes the commandline script zoid, see zoiduser(1) and zoidfaq(1) for help on using the zoidberg shell.
Options
-
-e command, --exec=command -
Execute a string as interpreted by zoidberg. If non-interactive exits with exit status of command string. Multiple commands may be given to build up a multi-line script. Make sure to use semicolons where you would in a normal multi-line script.
-
-C, --config -
Print a list of configuration variable of this installation and exit. Most importantly this tells you where
zoidwill search for it's configuration and data files.
-
-c command, --command=command -
Does the same as
--execbut this is bound to change.
-D,-DClass--debug-
Set either the global debug bit or set the debug bit for the given class. Using the global variant makes
zoidoutput a lot of debug information.
-
-h, --help
-
-u, --usage -
Print a help message and exits.
-Idir[,dir, ...]-
The specified directories are added to the module search path
@INC.
-
-i, --interactive -
Start an interactive shell. This is the default if no other options are supplied.
-
-l, --login -
Force login behavior, this will reset your current working directory. This variable is also available to plugins and scripts, which might act on it.
-
-mmodule
-
-Mmodule
-Mmodule=args[,arg, ...]-
Import module into the eval namespace. With
-mexplicit import empty list, with-Mdefault arguments or specified arguments. Details like the equivalent perl option, see perlrun(1).
-
-o setting
-
-o setting=value
+osetting-
Set (
-o) or unset (+o) one or more settings.
-
-s, --stdin -
Read input from stdin. This is the default if no other options are supplied and neither stdin or stdout are terminal devices.
-
-V, --version -
Display version information.
-
-v, --verbose -
Sets the shell in verbose mode. This will cause each command to be echoed to STDERR.
Environment
The variables $PWD, $HOME and $USER are set to default values if not yet set by the parent process.
The variable $ZOID will point to the location of the zoid executable, it is similar to $SHELL for POSIX compliant shells. zoid uses a different variable because some programs seem to expect $SHELL to point to a POSIX compliant shell.
To switch off ansi colours on the terminal set $CLICOLOR to 0 (null).
Files
Zoidberg uses rc files, data files and plugin files, use the --config switch to check the search paths used.
Which rcfiles are loaded is controlled be the 'rcfiles' and 'norc' settings, try "zoid -o norc" to skip all rcfiles or "zoid -o rcfiles=file1:file2:file3" to use files other then the default.
The runtime search path for plugins etc. can be controlled with the 'data_dirs' setting, try "zoid -o data_dirs=dir1:dir2:dir3".
Diagnostics
Error messages may be issued either by perl or by one any of the modules in use. The zoid utility itself will only complain when the commandline options are wrong. If the error was thrown by one of zoid's core modules, the error message will either start with the module name or the name of the command that went wrong.
Restrictions
Source files and command input are NOT interpreted the same way.
Use -e _or_ -c, do not mix them.
Releases
3 releases since Debian 3.1 (Sarge); the text changed 1 time.