diff options
Diffstat (limited to 'scripts/gist')
-rwxr-xr-x | scripts/gist | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/gist b/scripts/gist index 3cb53f5..72601ae 100755 --- a/scripts/gist +++ b/scripts/gist | |||
@@ -110,9 +110,8 @@ _show_list() { | |||
110 | | while read line_num link file_url_array file_num extra description; do | 110 | | while read line_num link file_url_array file_num extra description; do |
111 | local repo=$folder/$(echo $link | sed 's#.*/##') | 111 | local repo=$folder/$(echo $link | sed 's#.*/##') |
112 | 112 | ||
113 | # if repo is not yet cloned, show green message "Sync Now" | 113 | # if repo is not yet cloned, show green message "Not cloned yet" |
114 | # FIXME | 114 | [[ ! -d $repo ]] && extra="\e[32m[Not cloned yet]\e[0m" |
115 | [[ ! -d $repo ]] && extra="\e[32m[Sync Now]\e[0m" | ||
116 | # if there are some changes in git index or working directory, show blue message "working" | 115 | # if there are some changes in git index or working directory, show blue message "working" |
117 | [[ -n $(git status --short) ]] 2>/dev/null && extra="\e[36m[working]\e[0m" | 116 | [[ -n $(git status --short) ]] 2>/dev/null && extra="\e[36m[working]\e[0m" |
118 | # if there is a commit not yet push, show red message "ahead" | 117 | # if there is a commit not yet push, show red message "ahead" |
@@ -123,7 +122,6 @@ _show_list() { | |||
123 | } | 122 | } |
124 | 123 | ||
125 | # get the list of gists | 124 | # get the list of gists |
126 | # TODO support secret gist | ||
127 | _update() { | 125 | _update() { |
128 | echo "fetching from api.github.com..." | 126 | echo "fetching from api.github.com..." |
129 | echo | 127 | echo |
@@ -252,6 +250,7 @@ _new_file() { | |||
252 | 250 | ||
253 | # create a new gist with files | 251 | # create a new gist with files |
254 | # FIXME error handling if gist is not created, file doesn't exist | 252 | # FIXME error handling if gist is not created, file doesn't exist |
253 | # TODO support secret gist | ||
255 | _create_gist() { | 254 | _create_gist() { |
256 | _set_gist "$@" | 255 | _set_gist "$@" |
257 | [[ -z "$files" ]] && files=$(_new_file $filename) | 256 | [[ -z "$files" ]] && files=$(_new_file $filename) |