Hi. I came across this yesterday and found it useful, so I thought I'd contribute. I ported it to the Fish shell for users like myself who prefer Fish to Bash. I also made a couple of minor tweaks, like sending error output to stderr, and differentiating between a timeout error and 401 error...