Skip to content

Exported variables

TIP

Scroll the table horizontally

In addition to exporting the configuration variables above, zsh-abbr creates the following variables:

VariableAdded InTypeValue
ABBR_GLOBAL_SESSION_ABBREVIATIONS4.0.0associative arrayThe global session abbreviations
ABBR_GLOBAL_USER_ABBREVIATIONS4.0.0associative arrayThe global user abbreviations
ABBR_REGULAR_SESSION_ABBREVIATIONS4.0.0associative arrayThe regular session abbreviations
ABBR_REGULAR_USER_ABBREVIATIONS4.0.0associative arrayThe regular user abbreviations
ABBR_SOURCE_PATH3.3.3stringPath to the zsh-abbr.zsh
ABBR_UNUSED_ABBREVIATION6.0.0stringIf ABBR_GET_AVAILABLE_ABBREVIATION is non-zero and you miss an opportunity to use one of your abbreviations, this is set to the abbreviation you could have used.
ABBR_UNUSED_ABBREVIATION_EXPANSION6.0.0stringIf ABBR_GET_AVAILABLE_ABBREVIATION is non-zero and you miss an opportunity to use one of your abbreviations, this is set to the thing you could have abbreviated.
ABBR_UNUSED_ABBREVIATION_PREFIX6.0.0stringIf ABBR_GET_AVAILABLE_ABBREVIATION is non-zero and you miss an opportunity to use a prefixed abbreviation, this is set to the prefix.
ABBR_UNUSED_ABBREVIATION_SCOPE6.0.0stringIf ABBR_GET_AVAILABLE_ABBREVIATION is non-zero and you miss an opportunity to use one of your abbreviations, this is set to the scope (user or session) of abbreviation you could have used.
ABBR_UNUSED_ABBREVIATION_TYPE6.0.0stringIf ABBR_GET_AVAILABLE_ABBREVIATION is non-zero and you miss an opportunity to use one of your abbreviations, this is set to the type (regular or global) of the abbreviation you could have used.

Each element in ABBR_GLOBAL_SESSION_ABBREVIATIONS, ABBR_GLOBAL_USER_ABBREVIATIONS, ABBR_REGULAR_SESSION_ABBREVIATIONS, and ABBR_REGULAR_USER_ABBREVIATIONS has the form ABBREVIATION=EXPANSION. The expansion value is quoted. Scripters will probably want to remove one level of quotes, using the Q modifier (e.g. for v in ${(Qv)ABBR_REGULAR_USER_ABBREVIATIONS}...).

Transient exported variables

zsh-abbr exports the following variables in limited contexts:

TIP

Scroll the table horizontally

VariableAdded InTypeValue
ABBR_INITIALIZING4.0.0integerSet to 1 when zsh-abbr is initializing, otherwise not set
ABBR_LOADING_USER_ABBREVIATIONS4.0.0integerSet to 1 when the interactive shell is refreshing its list of user abbreviations, otherwise not set