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

Allow easy copy-paste of manual backporting steps #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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