From 87976421121cdb42eee7ea213d65f1cddcbe0a8e Mon Sep 17 00:00:00 2001 From: matchi Date: Wed, 8 Sep 2021 22:22:29 +0200 Subject: [PATCH] =?UTF-8?q?I=20ran=20./lint=5Fclean=5Ffiles.sh=20and=20fix?= =?UTF-8?q?ed=20the=20errors=EF=BB=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- completion/available/consul.completion.bash | 2 +- themes/atomic/atomic.theme.bash | 2 +- themes/base.theme.bash | 12 ++++++------ themes/brainy/brainy.theme.bash | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/completion/available/consul.completion.bash b/completion/available/consul.completion.bash index 3697ffc5..511cf372 100644 --- a/completion/available/consul.completion.bash +++ b/completion/available/consul.completion.bash @@ -3,5 +3,5 @@ cite "about-completion" about-completion "Hashicorp consul completion" if _command_exists consul; then - complete -C "$(which consul)" consul + complete -C "$(command -v consul)" consul fi diff --git a/themes/atomic/atomic.theme.bash b/themes/atomic/atomic.theme.bash index 6bde6801..a38356af 100644 --- a/themes/atomic/atomic.theme.bash +++ b/themes/atomic/atomic.theme.bash @@ -148,7 +148,7 @@ ___atomic_prompt_ruby() { ___atomic_prompt_todo() { [ "${THEME_SHOW_TODO}" != "true" ] \ - || [ -z "$(which todo.sh)" ] && return + || [ -z "$(command -v todo.sh)" ] && return color=$bold_white box="[|]" info="t:$(todo.sh ls | grep -E "TODO: [0-9]+ of ([0-9]+)" | awk '{ print $4 }')" diff --git a/themes/base.theme.bash b/themes/base.theme.bash index 4d6a1b7f..a2ca39b5 100644 --- a/themes/base.theme.bash +++ b/themes/base.theme.bash @@ -85,10 +85,10 @@ RBENV_THEME_PROMPT_SUFFIX='|' RBFU_THEME_PROMPT_PREFIX=' |' RBFU_THEME_PROMPT_SUFFIX='|' -GIT_EXE=$(which git 2> /dev/null || true) -P4_EXE=$(which p4 2> /dev/null || true) -HG_EXE=$(which hg 2> /dev/null || true) -SVN_EXE=$(which svn 2> /dev/null || true) +GIT_EXE=$(command -v git 2> /dev/null || true) +P4_EXE=$(command -v p4 2> /dev/null || true) +HG_EXE=$(command -v hg 2> /dev/null || true) +SVN_EXE=$(command -v svn 2> /dev/null || true) # Check for broken SVN exe that is caused by some versions of Xcode. # See https://github.com/Bash-it/bash-it/issues/1612 for more details. @@ -400,7 +400,7 @@ function node_version_prompt { } function rvm_version_prompt { - if which rvm &> /dev/null; then + if command -v rvm &> /dev/null; then rvm=$(rvm-prompt) || return if [ -n "$rvm" ]; then echo -e "$RVM_THEME_PROMPT_PREFIX$rvm$RVM_THEME_PROMPT_SUFFIX" @@ -409,7 +409,7 @@ function rvm_version_prompt { } function rbenv_version_prompt { - if which rbenv &> /dev/null; then + if command -v rbenv &> /dev/null; then rbenv=$(rbenv version-name) || return rbenv commands | grep -q gemset && gemset=$(rbenv gemset active 2> /dev/null) && rbenv="$rbenv@${gemset%% *}" if [ "$rbenv" != "system" ]; then diff --git a/themes/brainy/brainy.theme.bash b/themes/brainy/brainy.theme.bash index db8377ba..57351f78 100644 --- a/themes/brainy/brainy.theme.bash +++ b/themes/brainy/brainy.theme.bash @@ -136,7 +136,7 @@ ___brainy_prompt_ruby() { ___brainy_prompt_todo() { [ "${THEME_SHOW_TODO}" != "true" ] \ - || [ -z "$(which todo.sh)" ] && return + || [ -z "$(command -v todo.sh)" ] && return color=$bold_white box="[|]" info="t:$(todo.sh ls | grep -E "TODO: [0-9]+ of ([0-9]+)" | awk '{ print $4 }')"