Refactor "{{which,command -v} => _omb_util_{binary,command}_exists}"

`which` has been deprecated in Debian (at least, the rolling release
installed on chromebooks via Linux Containers)

https://github.com/ohmybash/oh-my-bash/pull/239#issuecomment-1000974461

Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
This commit is contained in:
M
2021-09-24 04:29:09 -07:00
committed by Koichi Murase
parent f52647d6d6
commit 4fb778c405
17 changed files with 20 additions and 20 deletions

View File

@@ -135,8 +135,8 @@ ___brainy_prompt_ruby() {
}
___brainy_prompt_todo() {
[ "${THEME_SHOW_TODO}" != "true" ] ||
[ -z "$(which todo.sh)" ] && return
[ "${THEME_SHOW_TODO}" != "true" ] && return
_omb_util_binary_exists todo.sh || return
color=$_omb_prompt_bold_white
box="[|]"
info="t:$(todo.sh ls | egrep "TODO: [0-9]+ of ([0-9]+)" | awk '{ print $4 }' )"