Skip to content

Conversation

rochacbruno
Copy link

I notice that when manual backport is needed the copy-paste of the command using the "copy" icon will include the leading $ which is not desired, for a quick run I suggest removing those from the instructions leaving just the bare command.

Screenshot_2022-08-18_11-55-20

Before: $ git remote add upstream https://github.com/ansible/galaxy_ng.git -> zsh: command not found: $

Now: git remote add upstream https://github.com/ansible/galaxy_ng.git

I notice that when manual backport is needed the copy-paste of the command using the "copy" icon will include the leading `$` which is not desired, for a quick run I suggest removing those from the instructions leaving just the bare command.
Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ is a prompt the console lexer uses for differentiating the user input from the example output. If you drop it, this lexer would treat the text as console output, which is not what we want.

Also, if this change is desired, then maybe there should be a config toggle...

@rochacbruno
Copy link
Author

You mean this?

Using console and $

$ pwd
/

no $

pwd
/

I think the github comment lexer doesn't differentiate this

@webknjaz
Copy link
Member

This is the lexer that is supposed to be used: https://pygments.org/docs/lexers/#pygments.lexers.shell.BashSessionLexer.

The difference is that it'll try to only use highlighting on the prompt-lines but not the output:

$ echo "Hi there ${USER}"
Hi there wk

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

Successfully merging this pull request may close these issues.

2 participants