-
Notifications
You must be signed in to change notification settings - Fork 128
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 Zsh Completion Script Generation and Unit Tests #1182
base: master
Are you sure you want to change the base?
Add Zsh Completion Script Generation and Unit Tests #1182
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@954alberto this is great (sorry for late review).
would you mind also adding the relevant docs for this?
do it in the nav+content md files and not README.md which is generated from them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please take a look, it should be better now
Summary: This PR introduces enhancements to the cargo-make tool by adding task completion script generation functionality per shell. Key updates include, in this case only Zsh was added:
Directory and File Management:
Automatically creates the ~/.zfunc directory if it does not exist.
Prompts users before overwriting the completion file if it already exists.
User Guidance:
Outputs clear instructions for enabling Zsh completions by modifying the ~/.zshrc file.
Testing Improvements:
Added unit tests for the completion generation function, including tests for user input handling and file creation.
Tests have been designed to clean up the test environment to avoid interference between test cases.
Ensures that the functionality can be tested without manually interacting with the terminal.