Skip to content

Commit

Permalink
Add support for ACCESS_TOKEN
Browse files Browse the repository at this point in the history
  • Loading branch information
ithinkihaveacat committed Jul 17, 2017
1 parent f0af938 commit 2fb3350
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion fish/functions/getcat.fish
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
function getcat -d "Retrieve single URL, output to stdout"
wget --quiet -O - $argv
if test -n "$ACCESS_TOKEN"
curl -sS -H "Authorization: Bearer $ACCESS_TOKEN" $argv
if test "$status" -eq 23
echo "error: $_ "
end
else
curl -sS $argv
end
end

0 comments on commit 2fb3350

Please sign in to comment.