diff --git a/themes/agnoster/agnoster.theme.sh b/themes/agnoster/agnoster.theme.sh index ebcd4c7..b1eb2d3 100755 --- a/themes/agnoster/agnoster.theme.sh +++ b/themes/agnoster/agnoster.theme.sh @@ -249,7 +249,7 @@ git_status_dirty() { # Git: branch/detached head, dirty status prompt_git() { local ref dirty - if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then + if git rev-parse --is-inside-work-tree &>/dev/null; then ZSH_THEME_GIT_PROMPT_DIRTY='±' dirty=$(git_status_dirty) ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git show-ref --head -s --abbrev |head -n1 2> /dev/null)" diff --git a/themes/rana/rana.theme.sh b/themes/rana/rana.theme.sh index ab1d660..5ab804e 100644 --- a/themes/rana/rana.theme.sh +++ b/themes/rana/rana.theme.sh @@ -137,12 +137,12 @@ prompt_git() { git update-index --really-refresh -q &>/dev/null; # Check for uncommitted changes in the index. - if ! $(git diff --quiet --ignore-submodules --cached); then + if ! git diff --quiet --ignore-submodules --cached; then s+='+'; fi; # Check for unstaged changes. - if ! $(git diff-files --quiet --ignore-submodules --); then + if ! git diff-files --quiet --ignore-submodules --; then s+='!'; fi; @@ -152,7 +152,7 @@ prompt_git() { fi; # Check for stashed files. - if $(git rev-parse --verify refs/stash &>/dev/null); then + if git rev-parse --verify refs/stash &>/dev/null; then s+='$'; fi; diff --git a/themes/rjorgenson/rjorgenson.theme.sh b/themes/rjorgenson/rjorgenson.theme.sh index 2375657..a0635ce 100644 --- a/themes/rjorgenson/rjorgenson.theme.sh +++ b/themes/rjorgenson/rjorgenson.theme.sh @@ -49,7 +49,7 @@ function is_integer() { # helper function for todo-txt-count } todo_txt_count() { - if `hash todo.sh 2>&-`; then # is todo.sh installed + if _omb_util_command_exists todo.sh; then # is todo.sh installed count=$(todo.sh ls | egrep "TODO: [0-9]+ of ([0-9]+) tasks shown" | awk '{ print $4 }') if is_integer $count; then # did we get a sane answer back echo "${BRACKET_COLOR}[${STRING_COLOR}T:$count${BRACKET_COLOR}]$normal"