-
Notifications
You must be signed in to change notification settings - Fork 902
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 completion file for bash/zsh (mainly for use in WSL/WSL2) #2978
base: develop
Are you sure you want to change the base?
Conversation
@hltdev8642 thank you for taking the time to submit this PR! For the testing section, can I ask that you provide some additional information? While it is correct that this addition isn't changing any Chocolatey functionality, it still has to be tested. i.e. what are the steps for adding the completion file into the terminal? Is it necessary to reboot the shell to take effect, etc. All of these types of things should be captured in this section so that anyone in the team, perhaps who aren't familiar with completion files (myself included), would be able to verify that things are working as expected. |
@hltdev8642 I wanted to follow up with the above request. Is this something that you can help us with? I would like to see this change land, however, in it's current state, we won't be able to move forward with this change. |
@gep13 , I was just a bit busy but going to work on this today ! I will have it done by the end of the day today 😉👍. |
Woot! That is great news, thank you! |
All set @gep13 , let me know if there is anything else needed 😉 Best, |
Description Of Changes
Add completion file for zsh (Mainly for use in WSL/WSL2).
Note: I can also create a bash completion file, if that is of interest
Motivation and Context
I use choco on a daily basis, mainly via WSL with the windows choco executable in my path and linked with an alias.
I thought it would be useful to have tab-completion in the linux shell, as otherwise you either have to continually execute the
choco --help
command, or switch to a powershell prompt to utilize the provided ps1 completion file provided.Thus, I made this completion file, using the
helpers/ChocolateyTabExpansion.ps1
file as a reference.Testing
N/A: Has no effect on any functionality, just a completion file.Adding the completion file into terminal (zsh):
restart shell: (can be done via:)
To test:
Note: You may have to add chocolatey to your path (if in WSL/WSL2) which is done by adding the following line to either your
~/.zsh_aliases
or~/.bash_aliases
file:(you can use
choco
,chocolatey
,chocolatey.exe
, etc ... (anything you want for a command name, and the completion will work regardless)Operating Systems Testing
N/A: Has no effect on any functionality, just a completion file.
Change Types Made
Change Checklist
Related Issue
Fixes #2977