From 2a4787d08724acb06e2a4c898a5484d35724f9a3 Mon Sep 17 00:00:00 2001 From: typebrook Date: Thu, 6 Feb 2020 16:00:45 +0800 Subject: update --- scripts/gist | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts/gist') diff --git a/scripts/gist b/scripts/gist index 3cdf96c..f7cb645 100755 --- a/scripts/gist +++ b/scripts/gist @@ -317,6 +317,10 @@ _goto_gist() { # TODO Add confirmation _delete_gist() { + read -r -p "Delete gists above? [y/N] " response + response=${response,,} + [[ ! "$response" =~ ^(yes|y)$ ]] && return 0 + for i in "$@"; do _gist_id "$i" http_method DELETE $GITHUB_API/gists/$GIST_ID \ @@ -363,7 +367,6 @@ for comment in raw: ' } -# TODO format with simple text _show_detail() { _gist_id $1 http_method GET $GITHUB_API/gists/$GIST_ID \ -- cgit v1.2.3-70-g09d2