On line 222 of _episodes/02-filedir.md, this command does not work on Max OSX, which implements BSD ls rather than GNU ls:
$ ls --help
I get this on a Mac:
$ ls --help
ls: illegal option -- -
usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]
See this on that topic. I suggest replacing ls --help by man ls, which works for both BSD and GNU tools.
The docs say that man ls doesn't work on Git Bash though, which is the recommended terminal client on Windows.
I see! so there is no one-fits-all solution. Have both ls --help and man ls plus a note, then?
Sure, that sounds good. @cecileane can you make PR with this change?
Can we officially suggest that learners use their favourite search engine to look for "man command"? And have a additional box saying that they can try man command, command --help or command -h on their terminal but if it is going to work or not will be a matter of environment?
I'd prefer to have man command as the "recommended" way of checking the documentation, leaving the box for Windows as is. The use case is, again, using a computer without a graphical interface such as a cluster, AWS machine, etc...
command -h or command --help usually show a subset of the documentation, mostly the usage part, but may be used for another options. Two examples relevant to the lesson are echo -h or echo --help, which just prints out -h or --help , and sort -h , which understand "human" numbers.
We could add another box "Other ways of getting help" mentioning that command -h or command --help are options that usually print a small subset of the documentation.
I agree that man is the recommended way of checking documentation, but for Windows users who are (usually) newer to the shell than people using other operating systems, this tosses them out of the lesson into "it doesn't work" land.
I found an answer on Superuser that says that you can install man on Git Bash using MinGW-get install msys-man. I can't test that until I get home tonight, but perhaps it can be added to the pre-workshop setup instructions and all will be well.
MinGW-get install msys-man
This does show up in other places as well, for example the finding things has grep --help, which won't work on Macs. Should a Windows/Mac/Linux recommended way be shown in all cases?