aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-01-28 00:12:35 +0800
committertypebrook <typebrook@gmail.com>2020-01-28 00:12:35 +0800
commit410961a0dfec18f2f1d48716a7100fbb25e9f993 (patch)
tree1b959e4a3cb9b4fcb6d666376e53fa7804912166
parent5f683413d7a5fee089920b1a0f6d2d1ea8aa2338 (diff)
update
-rwxr-xr-xscripts/gist7
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/gist b/scripts/gist
index a3ab4f2..1d7ed60 100755
--- a/scripts/gist
+++ b/scripts/gist
@@ -190,14 +190,13 @@ _goto_gist() {
190 cd $folder/$GIST_ID && ls && tig --all 2> /dev/null 190 cd $folder/$GIST_ID && ls && tig --all 2> /dev/null
191} 191}
192 192
193# TODO only remove deleted line
194_delete_gist() { 193_delete_gist() {
195 for i in "$@"; do 194 for i in "$@"; do
196 _gist_id "$i" 195 _gist_id "$i"
197 curl -X DELETE -s -H "$auth_header" $github_api/gists/$GIST_ID \ 196 curl -X DELETE -s -H "$auth_header" $github_api/gists/$GIST_ID \
198 && echo "$i" deleted 197 && echo "$i" deleted \
198 && sed -i -E "/^$i / d" $index
199 done 199 done
200 _update
201} 200}
202 201
203# remove repos which are not in user gists anymore 202# remove repos which are not in user gists anymore
@@ -230,8 +229,8 @@ _set_gist() {
230 esac 229 esac
231 done 230 done
232 if [[ "$1" == '--' ]]; then shift; fi 231 if [[ "$1" == '--' ]]; then shift; fi
233 ls "$@" || exit 1
234 files="$@" 232 files="$@"
233 ls $files > /dev/null || exit 1
235} 234}
236 235
237_new_file() { 236_new_file() {