RedHatGov / serverless-workshop-dashboard

Lab guides for a workshop on OpenShift Serverless (Knative)
Apache License 2.0
5 stars 4 forks source link

Switch execute commands to second terminal #28

Closed theckang closed 3 years ago

theckang commented 3 years ago

In some cases, the bash commands should be executed in a second terminal in homeroom. We should annotate like so

```execute-2 $ bash command ```

jkeam commented 3 years ago

The supported lexers that Github uses are here: https://github.com/github/linguist/blob/master/lib/linguist/languages.yml

execute and execute-2 are not on that list, meaning it won't get syntax highlighting. But this markdown will be displayed within the context of Homeroom, which I'm assuming uses the same lexer as Github.

Thoughts?

theckang commented 3 years ago

It looks like this

Screen Shot 2021-04-15 at 11 24 07 AM

If you add execute, you get a "arrow button" that you can click and it will execute the command in the window for you. execute-2 will execute that command in the second (bottom) window.

If your concern is "code highlighting", I don't think homeroom will respect it anyway. For example, this command block below uses bash but it doesn't highlight anyway. And you don't get the arrow button. So the user will have to copy and paste manually.

Screen Shot 2021-04-15 at 11 24 29 AM
theckang commented 3 years ago

edit oops: The curl commands are a bad example. check out the other image I uploaded above.

To be explicit, I don't think supported lexers matter because there's no highlighting. In addition, you can't get the arrow buttons unless you explicitly use execute or execute-2. This is most likely homeroom specific functionality.

jkeam commented 3 years ago

Ah ok that makes sense. I should go back and change all the shell to execute as well. I wasn't aware of the homeroom specific thing.

theckang commented 3 years ago

Homeroom magic :)

jkeam commented 3 years ago

Going to mark this resolved by PR https://github.com/RedHatGov/serverless-workshop-dashboard/pull/29