diff options
author | Alexara Wu <alexarawu@outlook.com> | 2018-07-14 01:32:07 +0300 |
---|---|---|
committer | Alexara Wu <alexarawu@outlook.com> | 2018-07-14 01:32:07 +0300 |
commit | 25e2064f0ec5b77b0e7b5214870f25c091a60847 (patch) | |
tree | 966b53f3388a9ed124683d9e0c0e80f6a9a1f392 /powerlevel9k.zsh-theme | |
parent | fc39d9d6b88ad02b1cebb1284aaa272e5b2af42c (diff) |
Improve command check
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 0dc7d6fe..c955651a 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -1264,7 +1264,7 @@ prompt_ram() { # Segment to display rbenv information set_default POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW false prompt_rbenv() { - if ! [ -x "$(command -v rbenv)" ]; then + if [ $commands[rbenv] ]; then local rbenv_version_name="$(rbenv version-name)" local rbenv_global="$(rbenv global)" @@ -1632,7 +1632,7 @@ prompt_virtualenv() { # https://github.com/pyenv/pyenv#choosing-the-python-version set_default POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW false prompt_pyenv() { - if ! [ -x "$(command -v pyenv)" ]; then + if [ $commands[pyenv] ]; then if [[ -n "$PYENV_VERSION" ]]; then "$1_prompt_segment" "$0" "$2" "blue" "$DEFAULT_COLOR" "$PYENV_VERSION" 'PYTHON_ICON' else |