Skip to content

Commit d46ad6e

Browse files
committed
Async.zsh wasn't loading
1 parent 9bcf6b4 commit d46ad6e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

agkozak-zsh-prompt.plugin.zsh

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

225+
typeset -g AGKOZAK_PROMPT_DIR="${0:A:h}"
226+
225227
###########################################################
226228
# If zsh-async has not already been loaded, try to load it;
227229
# the exit code should indicate success or failure
228230
#
229231
# Globals:
230232
# AGKOZAK_PROMPT_DEBUG
233+
# AGKOZAK_PROMPT_DIR
231234
###########################################################
232235
_agkozak_load_async_lib() {
233236
if ! whence -w async_init &> /dev/null; then # Don't load zsh-async twice
234237
if (( AGKOZAK_PROMPT_DEBUG )); then
235-
source "${0:A:h}/lib/async.zsh"
238+
source "${AGKOZAK_PROMPT_DIR}/lib/async.zsh"
236239
else
237-
source "${0:A:h}/lib/async.zsh" &> /dev/null
240+
source "${AGKOZAK_PROMPT_DIR}/lib/async.zsh" &> /dev/null
238241
fi
239242
local success=$?
240243
return $success

0 commit comments

Comments
 (0)