rabbitmq-website icon indicating copy to clipboard operation
rabbitmq-website copied to clipboard

Shell examples are confusing for Windows users

Open lukebakken opened this issue 3 years ago • 2 comments
trafficstars

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

lukebakken avatar Sep 20 '22 13:09 lukebakken

I'd say in 2022 we can go all PowerShell.

michaelklishin avatar Sep 20 '22 13:09 michaelklishin

@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:

Screenshot 2022-09-23 at 14 02 38

Use another image label for Windows and so on. It is very clear in documentation then.

pstack2021 avatar Sep 23 '22 13:09 pstack2021