Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shell examples are confusing for Windows users #1480

Open
lukebakken opened this issue Sep 20, 2022 · 2 comments
Open

Shell examples are confusing for Windows users #1480

lukebakken opened this issue Sep 20, 2022 · 2 comments
Assignees

Comments

@lukebakken
Copy link
Contributor

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

@michaelklishin
Copy link
Member

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

@pstack2021
Copy link
Contributor

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

@lukebakken lukebakken self-assigned this Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants