From 6a3c257511fb5dc9c6194e68399e8ae753fa5358 Mon Sep 17 00:00:00 2001 From: Marius Melzer Date: Thu, 13 Aug 2015 10:21:49 +0200 Subject: [PATCH] replace sed command in omf.remote to work on mac osx too --- plugins/omf/omf.remote.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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