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 for backticks (backquotes) in the CLI command help/usage messages. #1703

Closed
Tomasz-Smelcerz-SAP opened this issue Jul 12, 2023 · 4 comments
Labels
area/cli Related to all activities around CLI area/documentation Issues or PRs related to documentation wontfix This will not be worked on

Comments

@Tomasz-Smelcerz-SAP
Copy link
Member

Tomasz-Smelcerz-SAP commented Jul 12, 2023

Description

The Kyma-CLI docs in Markdown format are generated automatically from the text messages embedded in the CLI as the command help/usage. The primary use for these messages is to print it out to the user's terminal while interacting with the CLI.

Backticks (backquotes) are used to denote code blocks in Markdown.
Currently, if we include the backtick character in the CLI command help, the command fails with an error:

go run cmd/main.go alpha create module --help
# github.com/kyma-project/cli/cmd/kyma/alpha/create/module
cmd/kyma/alpha/create/module/module.go:52:118: syntax error: unexpected -- in composite literal; possibly missing comma or }
cmd/kyma/alpha/create/module/module.go:106:48: syntax error: unexpected ] at end of statement

This is because the command help in the CLI is deffined using golang's raw string literals that use backticks to denote the literal itself and no backtick can be embedded inside the string.
We also cannot easily switch to standard string literals, because then we have a problem of mulit-line text messages, which are typical for CLI help messages.

AC:

  • Allow to embed backtick characters in the CLI command help output, OR provide a simple workaround so that the generated Markdown docs have proper code blocks - at least for single words or sequences of words (command examples, snippets etc.)

Reasons

  • better user experience for auto-generated docs vs manually created documentation
  • proper code blocks in our web documentation
  • One can use the same (or similar) syntax in the *.md files AND in the text messages embedded in the CLI.
@Tomasz-Smelcerz-SAP Tomasz-Smelcerz-SAP added area/cli Related to all activities around CLI area/documentation Issues or PRs related to documentation labels Jul 12, 2023
@kyma-bot
Copy link

This issue or PR has been automatically marked as stale due to the lack of recent activity.
Thank you for your contributions.

This bot triages issues and PRs according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied
  • After 7d of inactivity since lifecycle/stale was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Close this issue or PR with /close

If you think that I work incorrectly, kindly raise an issue with the problem.

/lifecycle stale

@kyma-bot kyma-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 10, 2023
@mmitoraj mmitoraj removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 11, 2023
@kyma-bot
Copy link

This issue or PR has been automatically marked as stale due to the lack of recent activity.
Thank you for your contributions.

This bot triages issues and PRs according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied
  • After 7d of inactivity since lifecycle/stale was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Close this issue or PR with /close

If you think that I work incorrectly, kindly raise an issue with the problem.

/lifecycle stale

@kyma-bot kyma-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 10, 2023
@mmitoraj mmitoraj removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 16, 2023
@kyma-bot
Copy link

This issue or PR has been automatically marked as stale due to the lack of recent activity.
Thank you for your contributions.

This bot triages issues and PRs according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied
  • After 7d of inactivity since lifecycle/stale was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Close this issue or PR with /close

If you think that I work incorrectly, kindly raise an issue with the problem.

/lifecycle stale

@kyma-bot kyma-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 15, 2024
@mmitoraj mmitoraj removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 15, 2024
@janmedrek
Copy link
Contributor

Stopping the development according to: kyma-project/community#872

@janmedrek janmedrek added the wontfix This will not be worked on label Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Related to all activities around CLI area/documentation Issues or PRs related to documentation wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants