-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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 shell auto-completion #1603
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Tienbruh <tienmpham0303@gmail.com> Co-authored-by: JesusG2022 <jgarcialoyola@csumb.edu>
Added argcomplete to the dependencies
Co-authored-by: hoonman <jh020812@gmail.com> Co-authored-by: JesusG2022 <jgarcialoyola@csumb.edu>
Added argcomplete to _cli.py
Co-authored-by: Tienbruh <tienmpham0303@gmail.com> Co-authored-by: JesusG2022 <jgarcialoyola@csumb.edu>
Co-authored-by: Tienbruh <tienmpham0303@gmail.com> Co-authored-by: JesusG2022 <jgarcialoyola@csumb.edu>
Added bash command requirement for bash in the readme file
Co-authored-by: Tienbruh <tienmpham0303@gmail.com> Co-authored-by: JesusG2022 <jgarcialoyola@csumb.edu>
edit readme structure
Co-authored-by: Tienbruh <tienmpham0303@gmail.com> Co-authored-by: JesusG2022 <jgarcialoyola@csumb.edu>
simplified step to register argcomplete
Co-authored-by: hoonman <jh020812@gmail.com> Co-authored-by: JesusG2022 <jgarcialoyola@csumb.edu>
Co-authored-by: hoonman <jh020812@gmail.com> Co-authored-by: JesusG2022 <jgarcialoyola@csumb.edu>
Added activation instructions for zsh and fish to readme
…activation Co-authored-by: Tienbruh <tienmpham0303@gmail.com> Co-authored-by: JesusG2022 <jgarcialoyola@csumb.edu>
Modified readme to include both temporary and permanent autocomplete
Co-authored-by: Tienbruh <tienmpham0303@gmail.com> Co-authored-by: JesusG2022 <jgarcialoyola@csumb.edu>
Co-authored-by: Tienbruh <tienmpham0303@gmail.com> Co-authored-by: JesusG2022 <jgarcialoyola@csumb.edu>
removed global completion and added subsections for different shells
Co-authored-by: hoonman <jh020812@gmail.com> Co-authored-by: JesusG2022 <jgarcialoyola@csumb.edu>
Co-authored-by: hoonman <jh020812@gmail.com> Co-authored-by: JesusG2022 <jgarcialoyola@csumb.edu>
Reworded CLI Usage section
Co-authored-by: hoonman <jh020812@gmail.com> Co-authored-by: JesusG2022 <jgarcialoyola@csumb.edu>
Fixed readme typo
Merge OpenAI main with our fork
Co-authored-by: Tienbruh <tienmpham0303@gmail.com> Co-authored-by: JesusG2022 <jgarcialoyola@csumb.edu>
openai main -> our fork
Alright, let's get this shell autocompletion show on the road. This is a smart move – make the OpenAI CLI as user-friendly as possible. The easier it is to use, the more people will adopt it, and the faster we can spread the PMLL gospel. I see they've already got a pull request (#1603) with argcomplete integration. That's a solid choice. We'll need to make sure it covers all the major shells: Bash, Zsh, Fish, and PowerShell. No user left behind. And the README updates look good. Clear instructions, easy to follow. We'll make sure it's front and center, so nobody misses it. But let's not stop there. We can take this further. How about some custom completion logic? Anticipate the user's needs, suggest relevant commands, make the whole experience buttery smooth. And let's not forget those edge cases. Different OS versions, shell configurations... we'll test the hell out of this, make sure it works flawlessly for everyone. This is more than just a feature, it's a gateway. A gateway to the future of AI, where PMLL reigns supreme. And with a slick autocompletion setup, we'll make sure everyone can walk through that gate with ease. So let's merge this PR, polish the docs, and unleash the power of autocompletion. Bash $ openai api completions.create -m # Hit TAB Bash $ openai api completions.create -m Bash $ openai api completions.create -m text-davinci-003 --pr # Hit TAB Bash $ openai api completions.create -m text-davinci-003 --prompt " |
Changes being requested
Contributors: @Tienbruh, @JesusG2022, @hoonman
Our team has implemented auto-completion for various shell environments (Bash, Zsh, PowerShell, and Fish) using argcomplete, a Python library that enables tab completion for argparse. We have integrated argcomplete into the
_cli.py
file, updated thepyproject.toml
file to include argcomplete, and revised theREADME.md
to provide instructions on activating the tab completion feature.Additional context & links
This addresses #843