diff options
author | typebrook <typebrook@gmail.com> | 2020-02-06 10:48:03 +0800 |
---|---|---|
committer | typebrook <typebrook@gmail.com> | 2020-02-06 10:48:03 +0800 |
commit | 2d86c1013eb944eb6bc011c63209bf3363595ee8 (patch) | |
tree | d7187308d8d9c8211b58ce5ed8d8e6ae7185ee0d /scripts/gist | |
parent | 4af2cf3546f8a5dfac2e905e6101600dcdd9182b (diff) |
update
Diffstat (limited to 'scripts/gist')
-rwxr-xr-x | scripts/gist | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/gist b/scripts/gist index b901046..df7c745 100755 --- a/scripts/gist +++ b/scripts/gist | |||
@@ -183,7 +183,7 @@ _show_list() { | |||
183 | echo -e '\nrun "gist help" or "gist h" for more details' > /dev/tty | 183 | echo -e '\nrun "gist help" or "gist h" for more details' > /dev/tty |
184 | } | 184 | } |
185 | 185 | ||
186 | # support files | 186 | # TODO support filenames, file contents |
187 | _grep_content() { | 187 | _grep_content() { |
188 | _show_list other | grep -i $1 | 188 | _show_list other | grep -i $1 |
189 | } | 189 | } |
@@ -195,7 +195,6 @@ AccessJsonElement() { | |||
195 | return "$?" | 195 | return "$?" |
196 | } | 196 | } |
197 | 197 | ||
198 | # equal to: jq '.[] | "\(.html_url) \([.files[] | .raw_url]) \(.files | keys | length) \(.comments) \(.description)"' | ||
199 | _handle_gists() { | 198 | _handle_gists() { |
200 | echo ' | 199 | echo ' |
201 | raw = json.load(sys.stdin) | 200 | raw = json.load(sys.stdin) |
@@ -210,7 +209,7 @@ for gist in raw: | |||
210 | ' | 209 | ' |
211 | } | 210 | } |
212 | 211 | ||
213 | # TODO check if a user create a very first gist | 212 | # TODO check if a user has no gist |
214 | # parse response from gists require | 213 | # parse response from gists require |
215 | _parse_response() { | 214 | _parse_response() { |
216 | AccessJsonElement "$(_handle_gists)" \ | 215 | AccessJsonElement "$(_handle_gists)" \ |