A simple command is a sequence of optional variable assignments and redirections followed by a command name. When a simple command is recognized by qsh, it performs the following actions:
If a simple command does not contain any slashes, qsh finds the command by searching:
Command names containing a slash (/) are run as a regular utility without performing any of the above searches.
A built-in utility is run internal to the shell, without starting a new process. A special built-in utility is different from a regular built-in utility in these respects:
These are the special built-in utilities: break, colon, continue, declare, dot, eval, exec, exit, export, local, readonly, return, set, shift, source, trap, typeset, and unset.
When a shell function is run, all of the shell positional parameters (except the special parameter 0, which remains unchanged) are set to the arguments of the shell function. The variables which are explicitly placed in the environment of the command (by placing assignments to them before the function name) are made local to the function and are set to the specified values. The positional parameters are restored to their original values when the shell function completes.
When a regular utility is run, qsh starts a new process, passing the arguments and the environment to the program. If the program is a shell script, qsh will interpret the program in a subshell. qsh will reinitialize itself in this case, so that the effect will be as if a new shell had been invoked to handle the shell script.
Command exit status
Each command has an exit status that can influence the behavior of other shell commands. By convention, a command exits with zero for normal or success, and non-zero for failure, error, or a false indication. The documentation for each command describes the exit codes it returns and what they mean. The exit status can be one of these values: