summaryrefslogtreecommitdiff
path: root/plugins/jsontools/jsontools.plugin.zsh
diff options
context:
space:
mode:
authorCarlo Sala <carlosalag@protonmail.com>2022-04-09 14:45:42 +0200
committerGitHub <noreply@github.com>2022-04-09 14:45:42 +0200
commit0818df057cca59a949ffa88947a6b16dec2411ca (patch)
treee74e2a141c494fad28b72f0829655f1c448021f1 /plugins/jsontools/jsontools.plugin.zsh
parentb3999a4b156185b617a5608317497399f88dc8fe (diff)
downloadzsh-0818df057cca59a949ffa88947a6b16dec2411ca.tar.gz
zsh-0818df057cca59a949ffa88947a6b16dec2411ca.tar.bz2
zsh-0818df057cca59a949ffa88947a6b16dec2411ca.zip
fix: use `python3` for all `python` invocations (#10832)
Diffstat (limited to 'plugins/jsontools/jsontools.plugin.zsh')
-rw-r--r--plugins/jsontools/jsontools.plugin.zsh12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/jsontools/jsontools.plugin.zsh b/plugins/jsontools/jsontools.plugin.zsh
index 857ca0ec9..49828d32d 100644
--- a/plugins/jsontools/jsontools.plugin.zsh
+++ b/plugins/jsontools/jsontools.plugin.zsh
@@ -8,7 +8,7 @@ fi
# If method undefined, find the first one that is installed
if [[ -z "$JSONTOOLS_METHOD" ]]; then
- for JSONTOOLS_METHOD in node python ruby; do
+ for JSONTOOLS_METHOD in node python3 ruby; do
# If method found, break out of loop
(( $+commands[$JSONTOOLS_METHOD] )) && break
# Otherwise unset the variable
@@ -45,12 +45,12 @@ case "$JSONTOOLS_METHOD" in
xargs -0 node -e "console.log(decodeURIComponent(process.argv[1]))"
}
;;
- python)
+ python3)
function pp_json() {
- python -c 'import sys; del sys.path[0]; import runpy; runpy._run_module_as_main("json.tool")'
+ python3 -c 'import sys; del sys.path[0]; import runpy; runpy._run_module_as_main("json.tool")'
}
function is_json() {
- python -c '
+ python3 -c '
import sys; del sys.path[0];
import json
try:
@@ -61,14 +61,14 @@ except ValueError:
'
}
function urlencode_json() {
- python -c '
+ python3 -c '
import sys; del sys.path[0];
from urllib.parse import quote_plus
print(quote_plus(sys.stdin.read()))
'
}
function urldecode_json() {
- python -c '
+ python3 -c '
import sys; del sys.path[0];
from urllib.parse import unquote_plus
print(unquote_plus(sys.stdin.read()))