Skip to content

Commit

Permalink
Async PROMPT_COMMAND
Browse files Browse the repository at this point in the history
Speed up prompt by updating in the background. Might lead to more
~/.z.XXXX litter and less accurate counts - let's see.
  • Loading branch information
rupa committed Sep 30, 2016
1 parent 78f0d97 commit 4a8b741
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion z.sh
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ elif type complete >/dev/null 2>&1; then
[ "$_Z_NO_PROMPT_COMMAND" ] || {
# populate directory list. avoid clobbering other PROMPT_COMMANDs.
grep "_z --add" <<< "$PROMPT_COMMAND" >/dev/null || {
PROMPT_COMMAND="$PROMPT_COMMAND"$'\n''_z --add "$(command pwd '$_Z_RESOLVE_SYMLINKS' 2>/dev/null)" 2>/dev/null;'
PROMPT_COMMAND="$PROMPT_COMMAND"$'\n''(_z --add "$(command pwd '$_Z_RESOLVE_SYMLINKS' 2>/dev/null)" 2>/dev/null &);'
}
}
fi

0 comments on commit 4a8b741

Please sign in to comment.