From 3d71afc578fc16fa6261c6749976cfbb7409cfa5 Mon Sep 17 00:00:00 2001 From: typebrook Date: Tue, 12 May 2020 10:30:35 +0800 Subject: Refactor code --- gist | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gist b/gist index 16990e6..fddeb45 100755 --- a/gist +++ b/gist @@ -135,11 +135,11 @@ http_method() { || { echo "Error: no active internet connection" >&2; return 1; } } -httpGet(){ +httpGet() { http_method GET "$@" } -# Parse JSON from STDIN with string of commands +# Parse JSON from STDIN with string of python commands _process_json() { PYTHONIOENCODING=utf-8 \ python -c "from __future__ import print_function; import sys, json; $1" @@ -676,7 +676,7 @@ _new_file() { } # Parse JSON object of a single gist -_gist_body(){ +_gist_body() { _process_json " import os.path files_json = {} -- cgit v1.2.3-70-g09d2