diff options
-rwxr-xr-x | scripts/gist | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/gist b/scripts/gist index a3ab4f2..1d7ed60 100755 --- a/scripts/gist +++ b/scripts/gist | |||
@@ -190,14 +190,13 @@ _goto_gist() { | |||
190 | cd $folder/$GIST_ID && ls && tig --all 2> /dev/null | 190 | cd $folder/$GIST_ID && ls && tig --all 2> /dev/null |
191 | } | 191 | } |
192 | 192 | ||
193 | # TODO only remove deleted line | ||
194 | _delete_gist() { | 193 | _delete_gist() { |
195 | for i in "$@"; do | 194 | for i in "$@"; do |
196 | _gist_id "$i" | 195 | _gist_id "$i" |
197 | curl -X DELETE -s -H "$auth_header" $github_api/gists/$GIST_ID \ | 196 | curl -X DELETE -s -H "$auth_header" $github_api/gists/$GIST_ID \ |
198 | && echo "$i" deleted | 197 | && echo "$i" deleted \ |
198 | && sed -i -E "/^$i / d" $index | ||
199 | done | 199 | done |
200 | _update | ||
201 | } | 200 | } |
202 | 201 | ||
203 | # remove repos which are not in user gists anymore | 202 | # remove repos which are not in user gists anymore |
@@ -230,8 +229,8 @@ _set_gist() { | |||
230 | esac | 229 | esac |
231 | done | 230 | done |
232 | if [[ "$1" == '--' ]]; then shift; fi | 231 | if [[ "$1" == '--' ]]; then shift; fi |
233 | ls "$@" || exit 1 | ||
234 | files="$@" | 232 | files="$@" |
233 | ls $files > /dev/null || exit 1 | ||
235 | } | 234 | } |
236 | 235 | ||
237 | _new_file() { | 236 | _new_file() { |