From f74b0306df30582327fc3e2cedc2be3153e88b1f Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Thu, 29 Sep 2022 09:27:52 +0059 Subject: [PATCH] Use hash -d to allow completion of ~DIR --- zinit.zsh | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/zinit.zsh b/zinit.zsh index bddbd8f0b..30786fdb7 100644 --- a/zinit.zsh +++ b/zinit.zsh @@ -144,18 +144,13 @@ ZINIT_2MAP=( 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]} \ +# Add a few named directories. Can be used as e.g.: ~DIR, +# and are completed. +hash -d 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 + ZISERV=${ZINIT[SERVICES_DIR]} ZICACHE=$ZSH_CACHE_DIR \ + ZPFX=$ZPFX # ]]]