diff options
| -rwxr-xr-x | gist | 6 |
1 files changed, 6 insertions, 0 deletions
| @@ -39,6 +39,9 @@ | |||
| 39 | # Since now a gist is a local cloned repo | 39 | # Since now a gist is a local cloned repo |
| 40 | # It is your business to do git commit and git push | 40 | # It is your business to do git commit and git push |
| 41 | 41 | ||
| 42 | # TODO subcommand tag for #TAG in description | ||
| 43 | # TODO migrate to gh-page, with install.sh and check_md5 in README | ||
| 44 | |||
| 42 | currentVersion="1.23.0" | 45 | currentVersion="1.23.0" |
| 43 | configuredClient="" | 46 | configuredClient="" |
| 44 | 47 | ||
| @@ -251,6 +254,7 @@ _check_repo_status() { | |||
| 251 | 254 | ||
| 252 | # Show the list of gist, but not updated time | 255 | # Show the list of gist, but not updated time |
| 253 | # show username for starred gist | 256 | # show username for starred gist |
| 257 | # TODO color private/starred mark | ||
| 254 | _show_list() { | 258 | _show_list() { |
| 255 | if [[ ! -e $INDEX ]]; then | 259 | if [[ ! -e $INDEX ]]; then |
| 256 | echo 'No local file found for last update, please run command:' | 260 | echo 'No local file found for last update, please run command:' |
| @@ -276,6 +280,7 @@ _show_list() { | |||
| 276 | } | 280 | } |
| 277 | 281 | ||
| 278 | # TODO support filenames, file contents | 282 | # TODO support filenames, file contents |
| 283 | # TODO add option to configure case-sensitive | ||
| 279 | _grep_content() { | 284 | _grep_content() { |
| 280 | if [[ -z $1 ]]; then echo 'Please give a pattern' && return 1; fi | 285 | if [[ -z $1 ]]; then echo 'Please give a pattern' && return 1; fi |
| 281 | while read -r index url _ _ _ _ _ _ description; do | 286 | while read -r index url _ _ _ _ _ _ description; do |
| @@ -479,6 +484,7 @@ for comment in raw: | |||
| 479 | ' | 484 | ' |
| 480 | } | 485 | } |
| 481 | 486 | ||
| 487 | # TODO add parameter --comment to fetch comments | ||
| 482 | _show_detail() { | 488 | _show_detail() { |
| 483 | _gist_id "$1" || return 1 | 489 | _gist_id "$1" || return 1 |
| 484 | record=$(sed -ne "/^$1 / p" $INDEX) | 490 | record=$(sed -ne "/^$1 / p" $INDEX) |