Skip to content

Commit

Permalink
Async.zsh wasn't loading
Browse files Browse the repository at this point in the history
  • Loading branch information
agkozak committed Aug 16, 2018
1 parent 9bcf6b4 commit d46ad6e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions agkozak-zsh-prompt.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -222,19 +222,22 @@ TRAPWINCH() {
# ASYNCHRONOUS FUNCTIONS
###########################################################

typeset -g AGKOZAK_PROMPT_DIR="${0:A:h}"

###########################################################
# If zsh-async has not already been loaded, try to load it;
# the exit code should indicate success or failure
#
# Globals:
# AGKOZAK_PROMPT_DEBUG
# AGKOZAK_PROMPT_DIR
###########################################################
_agkozak_load_async_lib() {
if ! whence -w async_init &> /dev/null; then # Don't load zsh-async twice
if (( AGKOZAK_PROMPT_DEBUG )); then
source "${0:A:h}/lib/async.zsh"
source "${AGKOZAK_PROMPT_DIR}/lib/async.zsh"
else
source "${0:A:h}/lib/async.zsh" &> /dev/null
source "${AGKOZAK_PROMPT_DIR}/lib/async.zsh" &> /dev/null
fi
local success=$?
return $success
Expand Down

0 comments on commit d46ad6e

Please sign in to comment.