---
name: "Zoidberg::Fish::Commands"
section: "3pm"
platform: "linux"
package: "zoidberg"
version: "0.96-1"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/Zoidberg::Fish::Commands"
---

# Zoidberg::Fish::Commands(3pm)

Zoidberg::Fish::Commands - Zoidberg plugin with builtin commands This module is a Zoidberg plugin, see Zoidberg::Fish for details. This object contains internal/built-in commands for the Zoidberg shell.\
 **EXPORT** None by default. Changes the current working directory to *dir*. When used with a single dash changes to OLDPWD.

This command uses the environment variable 'CDPATH'. It serves as a search path when the directory you want to change to isn't found in the current directory.

This command also uses a directory history. The '-number' and '+number' switches are used to change directory to an positive or negative offset in this history. Execute *cmd*. This effectively ends the shell session, process flow will **NOT** return to the prompt. Eval *cmd* like a shell command. Main use of this is to run code stored in variables. Set the environment variable *var* to *value*.

TODO explain how export moved varraibles between the perl namespace and the environment Like **export**, but with a slightly different syntax. Set *var* to undefined. Set or unset a shell option. Although sometimes confusing a '+' switch unsets the option, while the '-' switch sets it.

Short options correspond to the following names:

```
        a  =>  allexport  *
        b  =>  notify
        C  =>  noclobber
        e  =>  errexit    *
        f  =>  noglob
        m  =>  monitor    *
        n  =>  noexec     *
        u  =>  nounset    *
        v  =>  verbose
        x  =>  xtrace     *
        *) Not yet supported by the rest of the shell
```

See zoiduser for a description what these and other options do.

FIXME takes also hash arguments Run the **perl** script *file*. This script is **NOT** the same as the commandline syntax. Try using Zoidberg::Shell in these scripts. Make *name* an alias to *command*. Aliases work like macros in the shell, this means they are substituted before the commnd code is interpreted and can contain complex statements.

Without *command* shows the alias defined for *name* if any; without arguments lists all aliases that are currently defined.

Aliases are simple substitutions at the start of a command string. If you want something more intelligent like interpolating arguments into a string define a builtin command; see hash. Remove an alias definition. TODO

Command to manipulate the commands hash and command lookup logic. Read a line from STDIN, split the line in words  and assign the words to the named enironment variables. Remaining words are stored in the last variable.

Unless '-r' is specified the backslash is treated as an escape char and is it possible to escape the newline char. TODO TODO A command that always returns an error without doing anything. A command that never fails and does absolutely nothing. Output the current dir stack.

TODO some options

Note that the dir stack is ont related to the dir history. It was only implemented because historic implementations have it. Pops a directory from the dir stack and **cd**s to that directory.

TODO some options Push *dir* on the dir stack.

TODO some options Prints the current PWD. Output a listing of symbols in the specified class. Class defaults to the current perl namespace, by default `"Zoidberg::Eval"`.

All symbols are prefixed by their sigil ('$', '@', '%', '&' or '\*') where '\*' is used for filehandles.

By default sub classes (hashes containing '::') and special symbols (symbols without letters in their name) are hidden. Use the --all switch to see these. Force (re-)loading of a module file. Typically used for debugging modules, where you reload the module after each modification to test it interactively.

TODO: recursive switch that scans for 'use' statements Prints out a help text. Finds ITEM in PATH or INC if the -m or --module option was used. If the -a or --all option is used all it doesn't stop after the first match.

TODO it should identify aliases

TODO what should happen with contexts other then CMD ? Lists current jobs.

If job specs are given as arguments only lists those jobs.

The --pgids option only lists the process group ids for the jobs without additional information.

The --list option gives more verbose output, it adds the process group id of the job and also shows the stack of commands pending for this job.

This command is not POSIX compliant. It uses '-l' in a more verbose way then specified by POSIX. If you wat to make sure you have POSIX compliant verbose output try: `"jobs -l ⎪ {! /^\t/}g"`. Run the job corresponding to *jobspec* as an asynchronous background process.

Without argument uses the "current" job. Run the job corresponding to *jobspec* as a foreground process.

Without argument uses the "current" job. TODO Sends a signal to a process or a process group. By default the "TERM" signal is used.

The '-l' option list all possible signals.

The -w or --wipe option is zoidberg specific. It not only kills the job, but also wipes the list that would be executed after the job ends. TODO\
 **Job specs** TODO tell bout job specs Jaap Karssenberg ⎪⎪ Pardus \[Larus\] \<pardus@cpan.org\> R.L. Zwart, \<rlzwart@cpan.org\> Copyright (c) 2002 Jaap G Karssenberg. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Zoidberg, Zoidberg::Fish
