environment

August 10, 2026 ยท View on GitHub

Define common environment variables.

Options

This plugin sets the following Zsh options:

actionoptiondescription
setoptEXTENDED_GLOBUse more awesome globbing features.
unsetoptRM_STAR_SILENTAsk for confirmation for rm * or rm path/*.
setoptCOMBINING_CHARSCombine zero-length chars with the base character (eg: accents).
setoptINTERACTIVE_COMMENTSEnable comments in interactive shell.
setoptRC_QUOTESAllow 'it''s' instead of 'it'\''s' for single-quoted strings.
unsetoptMAIL_WARNINGDon't print a warning when a mail file is accessed.
unsetoptBEEPDon't beep on error in the line editor.
setoptAUTO_RESUMEAttempt to resume existing job before creating a new process.
setoptLONG_LIST_JOBSList jobs in the long format by default.
setoptNOTIFYReport status of background jobs immediately.
unsetoptBG_NICEDon't run background jobs at a lower priority.
unsetoptCHECK_JOBSDon't report on jobs when shell exits.
unsetoptHUPDon't kill jobs on shell exit.

Functions

This plugin adds the following functions:

functiondescription
repathPut $prepath back at the front of $path after something prepends to it.

Aliases

This plugin sets no aliases.

Variables

This plugin sets the following variables:

variabledescription
EDITORDefault editor (fallback: nano)
VISUALDefault visual editor (fallback: nano)
PAGERDefault pager (fallback: less)
BROWSERDefault browser (macOS only, fallback: open)
LANGDefault locale (fallback: en_US.UTF-8)
LESSDefault Less options
LESSOPENLess input preprocessor command
KEYTIMEOUTKey sequence timeout in hundredths of a second
SHELL_SESSIONS_DISABLEDisable Apple Terminal session restore (macOS only)
XDG_CONFIG_HOMEXDG config directory (when use-xdg-basedirs enabled)
XDG_CACHE_HOMEXDG cache directory (when use-xdg-basedirs enabled)
XDG_DATA_HOMEXDG data directory (when use-xdg-basedirs enabled)
XDG_STATE_HOMEXDG state directory (when use-xdg-basedirs enabled)

Customizations

To set XDG base directories:

zstyle ':zephyr:plugin:environment' 'use-xdg-basedirs' 'yes'

To set a custom list of directories prepended to $PATH:

zstyle ':zephyr:plugin:environment' 'prepath' \
  $HOME/bin \
  $HOME/.local/bin

A leading ~ is expanded, so '~/bin' works as well as $HOME/bin.