aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xscripts/gist5
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 \