diff options
author | typebrook <typebrook@gmail.com> | 2020-02-06 16:00:45 +0800 |
---|---|---|
committer | typebrook <typebrook@gmail.com> | 2020-02-06 16:00:45 +0800 |
commit | 2a4787d08724acb06e2a4c898a5484d35724f9a3 (patch) | |
tree | 9355f9268aa3611e162ec5918c89747656ae0480 | |
parent | c67483e0b575edc6c7bc66227297248b83e4bcf1 (diff) |
update
-rwxr-xr-x | scripts/gist | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/gist b/scripts/gist index 3cdf96c..f7cb645 100755 --- a/scripts/gist +++ b/scripts/gist | |||
@@ -317,6 +317,10 @@ _goto_gist() { | |||
317 | 317 | ||
318 | # TODO Add confirmation | 318 | # TODO Add confirmation |
319 | _delete_gist() { | 319 | _delete_gist() { |
320 | read -r -p "Delete gists above? [y/N] " response | ||
321 | response=${response,,} | ||
322 | [[ ! "$response" =~ ^(yes|y)$ ]] && return 0 | ||
323 | |||
320 | for i in "$@"; do | 324 | for i in "$@"; do |
321 | _gist_id "$i" | 325 | _gist_id "$i" |
322 | http_method DELETE $GITHUB_API/gists/$GIST_ID \ | 326 | http_method DELETE $GITHUB_API/gists/$GIST_ID \ |
@@ -363,7 +367,6 @@ for comment in raw: | |||
363 | ' | 367 | ' |
364 | } | 368 | } |
365 | 369 | ||
366 | # TODO format with simple text | ||
367 | _show_detail() { | 370 | _show_detail() { |
368 | _gist_id $1 | 371 | _gist_id $1 |
369 | http_method GET $GITHUB_API/gists/$GIST_ID \ | 372 | http_method GET $GITHUB_API/gists/$GIST_ID \ |