Skip to content

Add syntax format to shell code examples #167

Description

@dboehmer

Some code examples, e.g. on https://www.rexify.org/get/index.html, show shell code. I suggest to declare the code format using this Markdown syntax to get syntax highlighting. This makes shell command a little more human friendly.

Current Markdown syntax (example from https://www.rexify.org/docs/guides/start_using__r__ex.html):

    $ rex -T
    Tasks
      start_apache                   Start Apache service
      uptime                         Get the uptime of all servers
    Server Groups
      myservers                       mywebserver, mymailserver, myfileserver

Output (no syntax highlighting):

$ rex -T
Tasks
  start_apache                   Start Apache service
  uptime                         Get the uptime of all servers
Server Groups
  myservers                       mywebserver, mymailserver, myfileserver

Suggested Markdown syntax:

```console
$ rex -T
Tasks
  start_apache                   Start Apache service
  uptime                         Get the uptime of all servers
Server Groups
  myservers                       mywebserver, mymailserver, myfileserver
```

Output (colored, at least on GitHub):

$ rex -T
Tasks
  start_apache                   Start Apache service
  uptime                         Get the uptime of all servers
Server Groups
  myservers                       mywebserver, mymailserver, myfileserver

Is this supported in the build system of the website? Would you accept a PR applying this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions