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

Add support for generating shell completions #82

Merged
merged 1 commit into from
Mar 17, 2023

Conversation

Brezak
Copy link
Contributor

@Brezak Brezak commented Mar 17, 2023

closes #79

Adds a --completions flag for generating shell completions

Copy link
Owner

@solidiquis solidiquis left a comment

Choose a reason for hiding this comment

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

Looks great! Minor change requested :]

src/main.rs Outdated
@@ -28,6 +29,12 @@ fn main() -> ExitCode {
fn run() -> Result<(), Box<dyn std::error::Error>> {
tree::ui::init();
Copy link
Owner

Choose a reason for hiding this comment

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

Would you mind moving this piece of code to below if let Some(shell) = ctx.completions { ... }? Just because there's no need to initialize all the UI code when setting up completions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@Brezak Brezak force-pushed the shell-completions-as-flag branch from dd83e55 to f06b533 Compare March 17, 2023 16:36
@solidiquis
Copy link
Owner

Thanks for this @Brezak! Will be included in next minor release sunday :]

@solidiquis solidiquis merged commit d2a6111 into solidiquis:master Mar 17, 2023
@Brezak Brezak deleted the shell-completions-as-flag branch March 20, 2023 12:19
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.

[feature] Add support for generating shell completions
2 participants