Skip to content

Commit

Permalink
Merge pull request #378 from psprint/vars
Browse files Browse the repository at this point in the history
  • Loading branch information
alichtman authored Sep 28, 2022
2 parents 061a85c + 9168d6c commit 37cd36e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions zinit.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,20 @@ ZINIT_2MAP=(
PZT:: https://raw.githubusercontent.com/sorin-ionescu/prezto/master/
PZTM:: https://raw.githubusercontent.com/sorin-ionescu/prezto/master/modules/
)

# Global aliases for quick access to zinit dirs, use simply as e.g.: cd ZIDIR
alias -g ZIBIN=${ZINIT[BIN_DIR]} \
ZIDIR=${ZINIT[HOME_DIR]} ZIPLUGS=${ZINIT[PLUGINS_DIR]} \
ZISNIPS=${ZINIT[SNIPPETS_DIR]} ZICOMPS=${ZINIT[COMPLETIONS_DIR]} \
ZISERV=${ZINIT[SERVICES_DIR]} ZICACHE=$ZSH_CACHE_DIR \
ZPFX=$ZPFX

# ... and few global variables, Can be used as e.g.: ~DIR or $DIR, etc.
typeset -g ZIBIN=${ZINIT[BIN_DIR]} \
ZIDIR=${ZINIT[HOME_DIR]} ZIPLUGS=${ZINIT[PLUGINS_DIR]} \
ZISNIPS=${ZINIT[SNIPPETS_DIR]} ZICOMPS=${ZINIT[COMPLETIONS_DIR]} \
ZISERV=${ZINIT[SERVICES_DIR]} ZICACHE=$ZSH_CACHE_DIR

# ]]]

# Init. [[[
Expand Down

0 comments on commit 37cd36e

Please sign in to comment.