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

Remove prefix from shell code snippets #6262

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

jamesnetherton
Copy link
Contributor

Not sure what others think about this.

From my POV, having the $ is a pain if you want to copy / paste commands from the shell code snippets.

Copy link
Contributor

@aldettinger aldettinger left a comment

Choose a reason for hiding this comment

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

This is indeed something of value 👍

@ppalaga
Copy link
Contributor

ppalaga commented Jul 9, 2024

$ is nicer visually, because one sees, where a command starts, but you are right that it is not so nice when copying. I would not mind removing them, but I just stumbled across this piece of Antora docs:

Console blocks
The default UI also adds a clipboard button to all console blocks. A console block is either a literal paragraph that begins with a $ or a source block with the language console.

The script provided by the default UI will automatically strip the $ prompt at the beginning of each line and join the lines with &&.

https://docs.antora.org/antora-ui-default/code-blocks/#console-blocks

It is a feature of default Antora UI, so it may or may not work in the same way in Camel custom UI.
We should perhaps try to switch from [source,shell] to [source,console]

@jamesnetherton
Copy link
Contributor Author

it may or may not work in the same way in Camel custom UI

Yes, there is no copy button support unfortunately apache/camel-website#1137.

@ppalaga
Copy link
Contributor

ppalaga commented Jul 9, 2024

Good to know. Let's get rid of the dollars then.

@jamesnetherton jamesnetherton merged commit 3305838 into apache:main Jul 9, 2024
@jamesnetherton jamesnetherton deleted the remove-shell-prefix branch July 9, 2024 12:27
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.

4 participants