-
Notifications
You must be signed in to change notification settings - Fork 151
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 #595
base: main
Are you sure you want to change the base?
add Zsh completion #595
Conversation
This is great, but is there a way to auto-generate this? I'm not sure we have the know-how to maintain this. Surely there's a somewhat standard way of doing autocomplete for |
There is pycomplete ( There is pyzshcomplete which works by integrating it into the source code. I could not get it to work, probably because i don't know python and was just guessing where to put the code. |
The pyzshcomplete readme describes how the Zsh completion is generated on the fly. We could already do it at 'buildtime' perhaps in Python using the argument structure? It is a nice feature for improved usability. |
I added a meta issue to track completions for popular shells: #629 |
Hi, One thing I have seen with several tools is that they have a "completion" subcommand that will output the completion file content for the selected shell on stdout. That way you do not require installation in a system specific (and possibly out of reach for the user) folder. I think that would be a better alternative as it will allow users to make use of it with for example oh my zsh . |
Having a completion sub-command also makes it easier to maintain support for other shells. In a Rust project I work on, there's an argument |
There are two ways in general. Dynamically (pycomplete, argcomplete) which work by invoking the program every time you press TAB or statically (python-shtab) which wraps Since I'm a fan of the latter, opened a PR #1076 |
This adds completion for Zsh. It should be installed into
/usr/share/zsh/site-functions
but i can't figure out how to do that with this build system. 😅screenshots