zsh - Compatibility

Go to the first, previous, next, last section, table of contents.

# Compatibility

`zsh` tries to emulate `sh` or `ksh` when it is invoked as `sh` or `ksh` respectively. In this mode the following parameters are not special: `ARGC`, `argv`, `cdpath`, `fignore`, `fpath`, `HISTCHARS`, `mailpath`, `MANPATH`, `manpath`, `path`, `prompt`, `PROMPT`, `PROMPT2`, `PROMPT3`, `PROMPT4`, `psvar`, `status`, `watch`.

The usual `zsh` startup/shutdown scripts are not executed. Login shells source ``/etc/profile'` followed by ``$HOME/.profile'`. If the `ENV` environment variable is set on invocation, `$ENV` is sourced after the profile scripts. The value of `ENV` is subjected to parameter expansion, command substitution, and arithmetic expansion before being interpreted as a pathname. Note that the `PRIVILEGED` option also affects the execution of startup files. See section Options, for more details.

The following options are set if the shell is invoked as `sh` or `ksh`: `NO_BAD_PATTERN`, `NO_BANG_HIST`, `NO_BG_NICE`, `NO_EQUALS`, `NO_FUNCTION_ARGZERO`, `GLOB_SUBST`, `NO_HUP`, `INTERACTIVE_COMMENTS`, `KSH_ARRAYS`, `NO_MULTIOS`, `NO_NOMATCH`, `RM_STAR_SILENT`, `POSIX_BUILTINS`, `SH_FILE_EXPANSION`, `SH_GLOB`, `SH_OPTION_LETTERS`, `SH_WORD_SPLIT`. Additionally the `KSH_OPTION_PRINT`, `LOCAL_OPTIONS`, `PROMPT_SUBST` and `SINGLE_LINE_ZLE` options are set if `zsh` is invoked as `ksh` and the `IGNORE_BRACES` and `BSD_ECHO` options are set if `zsh` is invoked as `sh`.

Go to the first, previous, next, last section, table of contents.