rabbitmq-website
rabbitmq-website copied to clipboard
Shell examples are confusing for Windows users
For instance, see this listing:
https://www.rabbitmq.com/clustering-ssl.html#strategy-one-flags
erl -noinput -eval 'io:format("ERL_SSL_PATH=~s~n", [filename:dirname(code:which(inet_tls_dist))])' -s init stop
The correct form of the above command when using cmd.exe is:
erl -noinput -eval "io:format(""ERL_SSL_PATH=~s~n"", [filename:dirname(code:which(inet_tls_dist))])" -s init stop
but when using Powershell, it must be:
erl -noinput -eval 'io:format("ERL_SSL_PATH=~s~n", [filename:dirname(code:which(inet_tls_dist))])' -s init stop
What would be the best way to show all three? It would be nice to have a "tabbed" code listing that users could choose from.
cc @pstack2021
I'd say in 2022 we can go all PowerShell.
@lukebakken @michaelklishin For simplicity in Markdown, I suggest using a bulleted list under the step description for the commands if they support multiple Operating Systems/CLIs etc
Example:
-
For Windows Command Prompt, run:
erl -noinput -eval "io:format(""ERL_SSL_PATH=~s~n"", [filename:dirname(code:which(inet_tls_dist))])" -s init stop -
For Windows Powershell, run:
erl -noinput -eval 'io:format("ERL_SSL_PATH=~s~n", [filename:dirname(code:which(inet_tls_dist))])' -s init stop
Another option would be to use a table under the step description with 2 **columns: Operating System/Command Line (or whatever) and Command each row of the table then representing the different OSs and commands. Negative of that would be if there are many steps in the procedure with commands which can be run on different OSs/CLIs the procedure would become cluttered with tables.
A final option (but I don't know how easily it would be to implement in Markdown) which I have used in previous product documentation is to use graphic image labels in the bullet points before each command. For example:
Use another image label for Windows and so on. It is very clear in documentation then.