diff --git a/plugins/omf/omf.remote.fish b/plugins/omf/omf.remote.fish index e3d441c..c660ca8 100644 --- a/plugins/omf/omf.remote.fish +++ b/plugins/omf/omf.remote.fish @@ -15,7 +15,7 @@ # function omf.remote --argument-names options -d 'List remote plugins and themes' 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]+$' echo "Could not access Github API" >&2