aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-03-17 09:15:49 +0800
committertypebrook <typebrook@gmail.com>2020-03-17 09:16:10 +0800
commit71ab694bb824f0b3305f72ce14e3f30826bb7250 (patch)
treeeb75533f8bb6129b0d7570004e8a37654e2cae44
parent11c169ba0bc0836c138eb3890d9fbd9710e145ac (diff)
Refactor code for order of functions
-rwxr-xr-xgist30
1 files changed, 15 insertions, 15 deletions
diff --git a/gist b/gist
index a593f27..df3c631 100755
--- a/gist
+++ b/gist
@@ -302,21 +302,6 @@ _grep_content() {
302 done < $INDEX 302 done < $INDEX
303} 303}
304 304
305# Open Github repository import page
306_import_to_github() {
307 _gist_id "$1" || return 1
308 echo put the folowing URL into web page:
309 echo -n "git@github.com:$GIST_ID.git"
310 python -mwebbrowser https://github.com/new/import
311}
312
313# Simply commit current changes and push to remote
314_push_to_remote() {
315 _gist_id "$1" || return 1
316 cd "$folder/$GIST_ID" && git add . \
317 && git commit --allow-empty-message -m '' && git push origin master
318}
319
320# Parse JSON object of the result of gist fetch 305# Parse JSON object of the result of gist fetch
321_parse_gists() { 306_parse_gists() {
322 _process_json ' 307 _process_json '
@@ -513,6 +498,21 @@ _show_detail() {
513 fi 498 fi
514} 499}
515 500
501# Open Github repository import page
502_import_to_github() {
503 _gist_id "$1" || return 1
504 echo put the folowing URL into web page:
505 echo -n "git@github.com:$GIST_ID.git"
506 python -mwebbrowser https://github.com/new/import
507}
508
509# Simply commit current changes and push to remote
510_push_to_remote() {
511 _gist_id "$1" || return 1
512 cd "$folder/$GIST_ID" && git add . \
513 && git commit --allow-empty-message -m '' && git push origin master
514}
515
516# Set filename/description/permission for a new gist 516# Set filename/description/permission for a new gist
517_set_gist() { 517_set_gist() {
518 files=() 518 files=()