summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-01-12 01:03:25 +0800
committertypebrook <typebrook@gmail.com>2020-01-12 01:03:25 +0800
commit5ff294050b27f36eaea1ab19ef3a65bde7a07bf5 (patch)
treeadd8e7e82e41849a9605413a38317aaf5392b13c
parenteeb7d09d1cd1eb13804d11e84ed1480e38f463c3 (diff)
update
-rw-r--r--alias1
-rwxr-xr-xscripts/gist4
2 files changed, 3 insertions, 2 deletions
diff --git a/alias b/alias
index 6b5042a..de098d5 100644
--- a/alias
+++ b/alias
@@ -219,6 +219,7 @@ alias m='mutt'
219 219
220# misc 220# misc
221alias foo="echo bar > foo && echo File foo is created && ls -lh foo" 221alias foo="echo bar > foo && echo File foo is created && ls -lh foo"
222alias bar="echo foo > bar && echo File bar is created && ls -lh bar"
222alias token="cd $SETTING_DIR/tokens && ls -lh" 223alias token="cd $SETTING_DIR/tokens && ls -lh"
223alias gr='_grepString' 224alias gr='_grepString'
224_grepString() { 225_grepString() {
diff --git a/scripts/gist b/scripts/gist
index b55012b..007032b 100755
--- a/scripts/gist
+++ b/scripts/gist
@@ -107,7 +107,7 @@ _show_detail() {
107 jq '.[] | {user: .user.login, created_at: .created_at, updated_at: .updated_at, body: .body}' 107 jq '.[] | {user: .user.login, created_at: .created_at, updated_at: .updated_at, body: .body}'
108} 108}
109 109
110# create a new gist with a file and description 110# create a new gist with files
111# TODO support folder of files 111# TODO support folder of files
112_create_gist() { 112_create_gist() {
113 echo -n 'description: ' 113 echo -n 'description: '
@@ -124,7 +124,7 @@ _create_gist() {
124 description: ($DESC) 124 description: ($DESC)
125 }' |\ 125 }' |\
126 curl -s -H "$auth_header" --data @- $github_api/gists > /dev/null && \ 126 curl -s -H "$auth_header" --data @- $github_api/gists > /dev/null && \
127 _update 127 _update && _sync_repos
128} 128}
129 129
130# update description of a gist 130# update description of a gist