add support for download all gist
Closed this issue · 2 comments
cow03haha commented
like can use wildcard character or options in getgist
i think
cuducos commented
I am not convinced this is a good use case — Gist file names are not guarantee to be unique, so a lot of duplicated names is expected, what rises interesting UX questions: how to deal with duplicate file names?
An alternative is to parse lsgists
output and pipe the results. I think something like this might download all your Gists:
$ lsgists cow03haha | awk '{split($0, v, / {2,}/); print v[3]}' | xargs getgist cow03haha
I am using awk
's split
command and splitting each line on sequences of two or more spaces (thus, the regular expression / {2,}/
. Then I print the third element of the result of this split for each line. Finally I pipe this printed value to getgist cow03haha
with xargs
: )
cow03haha commented
ok, thanks to your reply