summaryrefslogtreecommitdiff
path: root/plugins/jsontools/jsontools.plugin.zsh
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2021-10-23 18:01:40 -0600
committerTuowen Zhao <ztuowen@gmail.com>2021-10-23 18:01:40 -0600
commitfad92c603be0ff36825cc53bf8c485d4b95c7869 (patch)
tree407fe826be62a3543b6feab4f3552f58575234de /plugins/jsontools/jsontools.plugin.zsh
parentc674485e6b4abe313469900997d893d2940ee843 (diff)
parentf1dd97bb2a9df55fae9b1ca26c829b9f8b290667 (diff)
downloadzsh-fad92c603be0ff36825cc53bf8c485d4b95c7869.tar.gz
zsh-fad92c603be0ff36825cc53bf8c485d4b95c7869.tar.bz2
zsh-fad92c603be0ff36825cc53bf8c485d4b95c7869.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'plugins/jsontools/jsontools.plugin.zsh')
-rw-r--r--plugins/jsontools/jsontools.plugin.zsh4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/jsontools/jsontools.plugin.zsh b/plugins/jsontools/jsontools.plugin.zsh
index ed45cfa8e..857ca0ec9 100644
--- a/plugins/jsontools/jsontools.plugin.zsh
+++ b/plugins/jsontools/jsontools.plugin.zsh
@@ -7,7 +7,7 @@ if [[ -n "$JSONTOOLS_METHOD" ]]; then
fi
# If method undefined, find the first one that is installed
-if [[ ! -v JSONTOOLS_METHOD ]]; then
+if [[ -z "$JSONTOOLS_METHOD" ]]; then
for JSONTOOLS_METHOD in node python ruby; do
# If method found, break out of loop
(( $+commands[$JSONTOOLS_METHOD] )) && break
@@ -16,7 +16,7 @@ if [[ ! -v JSONTOOLS_METHOD ]]; then
done
# If no methods were found, exit the plugin
- [[ -v JSONTOOLS_METHOD ]] || return 1
+ [[ -n "$JSONTOOLS_METHOD" ]] || return 1
fi
# Define json tools for each method