|
|
@ -15,7 +15,7 @@
|
|
|
|
#
|
|
|
|
#
|
|
|
|
function omf.remote --argument-names options -d 'List remote plugins and themes'
|
|
|
|
function omf.remote --argument-names options -d 'List remote plugins and themes'
|
|
|
|
set url "https://api.github.com/orgs/oh-my-fish/repos"
|
|
|
|
set url "https://api.github.com/orgs/oh-my-fish/repos"
|
|
|
|
set page_count (curl -sI "$url?page=1&per_page=100" | sed -nr 's/^Link:.*page=([0-9]+)&per_page=100>; rel="last".*/\1/p')
|
|
|
|
set page_count (curl -sI "$url?page=1&per_page=100" | grep "^Link" | sed 's/Link:.*page=\([0-9]*\)&per_page=100>; rel="last".*/\1/')
|
|
|
|
|
|
|
|
|
|
|
|
if echo $page_count | grep -vE '^[0-9]+$'
|
|
|
|
if echo $page_count | grep -vE '^[0-9]+$'
|
|
|
|
echo "Could not access Github API" >&2
|
|
|
|
echo "Could not access Github API" >&2
|
|
|
|