aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-05-22 21:03:30 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-05-22 21:03:30 +0300
commita49dc626f324e849757b730334939dc5a5b55cdf (patch)
tree788a6ad94523a2ef7e6a957aa5b8a206c07474b9 /powerlevel9k.zsh-theme
parent7ca1d950f1eb759812248a569090656e00afb525 (diff)
only call dropbox-cli if it exists
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme3
1 files changed, 2 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 72757560..cf6b9d95 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -2074,8 +2074,9 @@ prompt_kubecontext() {
################################################################
# Dropbox status
prompt_dropbox() {
+ (( $+commands[dropbox-cli] )) || return
# The first column is just the directory, so cut it
- local dropbox_status="$(dropbox-cli filestatus . | cut -d\ -f2-)"
+ local dropbox_status="$(command dropbox-cli filestatus . | cut -d\ -f2-)"
# Only show if the folder is tracked and dropbox is running
if [[ "$dropbox_status" != 'unwatched' && "$dropbox_status" != "isn't running!" ]]; then