pimoroni / unicorn-hat

Python library for Unicorn pHAT and HAT. 32 or 64 blinding ws2812 pixels for your Raspberry Pi
https://shop.pimoroni.com/products/unicorn-hat
MIT License
370 stars 131 forks source link

Removed slash before curl command #118

Closed neauoire closed 5 years ago

Gadgetoid commented 6 years ago

In bash this is, for better or worse, intentional since it prevents any alias intercepting the "curl" command and breaking/changing it. Observe:

$ curl
curl: try 'curl --help' or 'curl --manual' for more information
$ alias curl="echo \"Oh no\""
$ curl
On no
$ \curl
curl: try 'curl --help' or 'curl --manual' for more information
$ unalias curl

It breaks in Fish, and I'm sure, other alternate shells though and I'm not sure it provides any real tangible benefit to users of Bash.

neauoire commented 6 years ago

Ah! Good to know, I had no clue, it's the first time I stumble upon this, and as the other README.md files for the other hats did not include this, I thought it might have been accidental. Thanks :)

lurch commented 5 years ago

How likely is it that curl gets aliased to something else, and how likely is it that the "aliased curl" won't do what you expect it to?

Gadgetoid commented 5 years ago

I can't say I've got a good answer for that!

lurch commented 5 years ago

On the same topic of consistency... the unicorn-hat repo uses

\curl -sS https://get.pimoroni.com/unicornhat | bash

but the unicorn-hat-hd repo uses

curl https://get.pimoroni.com/unicornhathd | bash

:stuck_out_tongue_winking_eye:

(I think most readers, myself included, would assume that \curl is a typo and might 'auto-correct' it to just curl when typing it in?)

P.S. Hello Phil! :slightly_smiling_face: :wave:

Gadgetoid commented 5 years ago

I would be inclined to agree with the 'auto-correct' hypotheses. We should canonicalise on no-slash.

P.S. Hiiii! Long time no see!