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

feat(typst): add typst completion spec #2144

Merged
merged 1 commit into from
Nov 30, 2023
Merged

Conversation

toddlerer
Copy link
Contributor

Add spec for Typst CLI completion

@toddlerer toddlerer requested a review from mschrage as a code owner October 19, 2023 18:55
@withfig-bot
Copy link
Collaborator

withfig-bot commented Oct 19, 2023

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@withfig-bot
Copy link
Collaborator

Overview

src/typst.ts:

Info:

@withfig-bot
Copy link
Collaborator

Hello @toddlerer,
thank you very much for creating a Pull Request!
Here is a small checklist to get this PR merged as quickly as possible:

  • Do all subcommands / options which take arguments include the args property (args: {})?
  • Are all options modular? E.g. -a -u -x instead of -aux
  • Have all other checks passed?

Please add a 👍 as a reaction to this comment to show that you read this.

@toddlerer
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

withfig-bot added a commit that referenced this pull request Oct 19, 2023
Comment on lines +359 to +364
{
name: ["-v", "--verbosity"],
description:
"Sets the level of logging verbosity: -v = warning & error, -vv = info, -vvv = debug, -vvvv = trace",
isRepeatable: 4,
},
Copy link
Member

Choose a reason for hiding this comment

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

A bit of an edge case, but I think it makes sense to split these into two options.

Suggested change
{
name: ["-v", "--verbosity"],
description:
"Sets the level of logging verbosity: -v = warning & error, -vv = info, -vvv = debug, -vvvv = trace",
isRepeatable: 4,
},
{
name: ["-v"],
description:
"Sets the level of logging verbosity",
isRepeatable: 4,
},
{
name: ["--verbosity"],
args: {
name: "level",
suggestions: ["warning", "error", "info", "debug", "trace"]
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right. An option like that --verbosity might be easier to use. Since I am not an typst maintainer, it might be good if you could suggest it for typst.

Copy link
Member

Choose a reason for hiding this comment

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

I believe this is verbatim how the command works right now, you can literally repeat --verbosity up to 4 times.

Copy link
Member

@grant0417 grant0417 left a comment

Choose a reason for hiding this comment

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

LGMT!

@grant0417 grant0417 merged commit ce1d910 into withfig:master Nov 30, 2023
4 checks passed
@withfig withfig locked and limited conversation to collaborators Nov 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants