aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-03-16 20:44:48 +0800
committertypebrook <typebrook@gmail.com>2020-03-16 20:44:48 +0800
commit477e44c505b0cc2b8814bcf901aa3730e166f8c6 (patch)
tree7b8da2a8264e9598774e2e4c3a1f35289a07505a
parent062619791cb6cea9557d3e10624b6a067c3d84a1 (diff)
parentca95437407c19202e2be01e21565468515d95e39 (diff)
Merge commit 'ca95437407c19202e2be01e21565468515d95e39' into HEAD
-rwxr-xr-xgist6
1 files changed, 6 insertions, 0 deletions
diff --git a/gist b/gist
index f1583bb..5e9789e 100755
--- a/gist
+++ b/gist
@@ -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
42currentVersion="1.23.0" 45currentVersion="1.23.0"
43configuredClient="" 46configuredClient=""
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)