diff options
author | typebrook <typebrook@gmail.com> | 2020-05-14 11:03:41 +0800 |
---|---|---|
committer | typebrook <typebrook@gmail.com> | 2020-05-14 11:58:05 +0800 |
commit | d9789e8e9b1e7b47a4b614fe1b31b647d99fb77b (patch) | |
tree | 69e87bb484e21bb237b08b5a11ea9ae3449be02f | |
parent | 511de1c70166101b199aadf66e39f6e119eebf22 (diff) |
Update comments, helper msg and todo items
-rwxr-xr-x | gist | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -38,18 +38,19 @@ | |||
38 | # update Update Bash-Snippet Tools | 38 | # update Update Bash-Snippet Tools |
39 | # | 39 | # |
40 | # Example: | 40 | # Example: |
41 | # gist (Show your gists) | ||
42 | # gist tag (Show your gists with tags) | ||
43 | # gist fetch (update the list of gists from github.com) | 41 | # gist fetch (update the list of gists from github.com) |
42 | # gist (Show your gists) | ||
44 | # gist 3 (show the repo path of your 3rd gist, and do custom actions) | 43 | # gist 3 (show the repo path of your 3rd gist, and do custom actions) |
45 | # gist 3 --no-action (show the repo path of your 3rd gist, and do not perform actions) | 44 | # gist 3 --no-action (show the repo path of your 3rd gist, and do not perform actions) |
46 | # gist new --desc bar foo (create a new gist with files and description) | 45 | # gist new foo bari (create a new gist with files foo and bar) |
46 | # gist tag (Show your gists with tags) | ||
47 | # gist tag 3 (Add tags to your 3rd gist) | 47 | # gist tag 3 (Add tags to your 3rd gist) |
48 | # gist tag .+ (show tagged gists) | 48 | # gist tag .+ (show tagged gists) |
49 | # | 49 | # |
50 | # Since now a gist is a local cloned repo | 50 | # Since now a gist is a local cloned repo |
51 | # It is your business to do git commit and git push | 51 | # It is your business to do git commit and git push |
52 | 52 | ||
53 | # TODO Named temp file | ||
53 | # TODO feature to exclude tag-value or grep-string | 54 | # TODO feature to exclude tag-value or grep-string |
54 | # TODO codebase statistics, like C++ or something | 55 | # TODO codebase statistics, like C++ or something |
55 | # TODO migrate to gh-page, with install.sh and check_md5 in README | 56 | # TODO migrate to gh-page, with install.sh and check_md5 in README |
@@ -57,7 +58,7 @@ | |||
57 | currentVersion="1.23.0" | 58 | currentVersion="1.23.0" |
58 | configuredClient="" | 59 | configuredClient="" |
59 | 60 | ||
60 | NAME=${GISTSCRIPT:-$(basename $0)} | 61 | NAME=${GISTSCRIPT:-$(basename $0)} #show hint and helper message with current script name |
61 | GITHUB_API=https://api.github.com | 62 | GITHUB_API=https://api.github.com |
62 | CONFIG=~/.config/gist.conf; mkdir -p ~/.config | 63 | CONFIG=~/.config/gist.conf; mkdir -p ~/.config |
63 | 64 | ||
@@ -326,7 +327,7 @@ _index_pattern() { | |||
326 | 327 | ||
327 | # Display the list of gist, show username for starred gist | 328 | # Display the list of gist, show username for starred gist |
328 | # If hint=false, do not print hint to tty. If mark=<pattern>, filter index with regex | 329 | # If hint=false, do not print hint to tty. If mark=<pattern>, filter index with regex |
329 | # If display=tag, print tags instead or url | 330 | # If display=tag/language, print tags/languages instead or url |
330 | _show_list() { | 331 | _show_list() { |
331 | if [[ ! -s $INDEX ]]; then | 332 | if [[ ! -s $INDEX ]]; then |
332 | echo "Index file is empty, please run commands "$NAME fetch" or "$NAME create"" | 333 | echo "Index file is empty, please run commands "$NAME fetch" or "$NAME create"" |