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

Generate shell completions for nextonic #1171

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

bryango
Copy link
Contributor

@bryango bryango commented Mar 12, 2024

This is made possible by recent cleanups #1162, #1167, #1169 of the cli implementations. Thank you all! @rm-dr @CraftSpider

The completions are generated by clap_complete. The current v1 & v2 cli mixture makes it a bit difficult to offer clean completions for the tectonic command, so for now we only target the nextonic command exclusively for the v2 cli. To print the shell completions, simply run:

tectonic -X show shell-completions zsh # or bash, or your favorite <SHELL>

Copy link

codecov bot commented Mar 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.95%. Comparing base (82484db) to head (c0e57c0).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1171      +/-   ##
==========================================
+ Coverage   46.92%   46.95%   +0.02%     
==========================================
  Files         177      177              
  Lines       65160    65179      +19     
==========================================
+ Hits        30575    30602      +27     
+ Misses      34585    34577       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bryango bryango force-pushed the shell-completions branch 2 times, most recently from c72fa5a to 0711b68 Compare March 12, 2024 15:18
@bryango bryango marked this pull request as ready for review March 12, 2024 15:18
@bryango
Copy link
Contributor Author

bryango commented Mar 12, 2024

Documented shell completions in the book. Aside: there are other useful information that tectonic -X show can provide, e.g. the hardcoded bundle url. I can work on this in a future PR.

This is achieved with clap_complete.

The current v1 & v2 cli mixture makes it a bit difficult to offer
clean completions for the `tectonic` command, so for now we only
target the `nextonic` command exclusively for the v2 cli.
@rm-dr rm-dr merged commit 78c53c0 into tectonic-typesetting:master Sep 20, 2024
28 checks passed
@bryango bryango deleted the shell-completions branch September 22, 2024 08:25
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