Skip to content

Commit 75f4bf6

Browse files
committed
Eliminated global AGKOZAK_PROMPT_DIR
1 parent 74a9842 commit 75f4bf6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

agkozak-zsh-prompt.plugin.zsh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,22 +222,19 @@ TRAPWINCH() {
222222
# ASYNCHRONOUS FUNCTIONS
223223
###########################################################
224224

225-
typeset -g AGKOZAK_PROMPT_DIR=${0:A:h}
226-
227225
###########################################################
228226
# If zsh-async has not already been loaded, try to load it;
229227
# the exit code should indicate success or failure
230228
#
231229
# Globals:
232230
# AGKOZAK_PROMPT_DEBUG
233-
# AGKOZAK_PROMPT_DIR
234231
###########################################################
235232
_agkozak_load_async_lib() {
236233
if ! whence -w async_init &> /dev/null; then # Don't load zsh-async twice
237234
if (( AGKOZAK_PROMPT_DEBUG )); then
238-
source "${AGKOZAK_PROMPT_DIR}/lib/async.zsh"
235+
source "${0:A:h}/lib/async.zsh"
239236
else
240-
source "${AGKOZAK_PROMPT_DIR}/lib/async.zsh" &> /dev/null
237+
source "${0:A:h}/lib/async.zsh" &> /dev/null
241238
fi
242239
local success=$?
243240
return $success
@@ -611,7 +608,6 @@ agkozak_zsh_prompt() {
611608
agkozak_zsh_prompt
612609

613610
# Clean up environment
614-
unset AGKOZAK_PROMPT_DIR
615611
unfunction _agkozak_load_async_lib _agkozak_has_usr1 \
616612
_agkozak_is_ssh
617613

0 commit comments

Comments
 (0)