From 58167f1879f47bf47785cc3c959f30375d54da42 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Sat, 13 Jun 2015 13:21:44 +0300 Subject: [PATCH] Use standard `[[ ]]` for conditional and add clarifications --- pure.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pure.zsh b/pure.zsh index f6fd34d..871d4da 100644 --- a/pure.zsh +++ b/pure.zsh @@ -185,8 +185,8 @@ prompt_pure_async_tasks() { # get the current git working tree, empty if not inside a git directory local working_tree="$(command git rev-parse --show-toplevel 2>/dev/null)" - # check if the working tree changed, it is prefixed with "x" to prevent variable resolution in path - if [ "${prompt_pure_current_working_tree:-x}" != "x${working_tree}" ]; then + # check if the working tree changed (prompt_pure_current_working_tree is prefixed by "x") + if [[ "${prompt_pure_current_working_tree:-x}" != "x${working_tree}" ]]; then # stop any running async jobs async_flush_jobs "prompt_pure" @@ -194,7 +194,7 @@ prompt_pure_async_tasks() { unset prompt_pure_git_dirty unset prompt_pure_git_delay_dirty_check - # set the new working tree, prefixed with "x" + # set the new working tree and prefix with "x" to prevent the creation of a named path by AUTO_NAME_DIRS prompt_pure_current_working_tree="x${working_tree}" fi