Open fenhl opened 5 years ago
I would like this crate to support shells other than Bash, but I have not yet found the time to experiment with Zsh. A preliminary review of some documentation (linked below) suggests it should be possible.
I think the primary difference as an end user of these completions would be that Zsh users would register a completion with a wrapper script which might look something like this (assuming the completions are for my_cli
and the completion binary generated by shell_completion is _my_cli_completions
).
#compdef my_cli
# put this in $fpath
compadd $(_my_cli_completions)
I'm not a Zsh user, so I have a couple open questions:
_my_cli_completions
just return a space separated list of completions? _my_cli_completions
? Will it be passed automatically by the shell in the form of environment variables? Is there something additional we can add to the wrapper script to pull this information out and pass it into _my_cli_completions
explicitly as arguments?Any help here would be appreciated. I'd like to get to it myself in the next few weeks.
http://zsh.sourceforge.net/Doc/Release/Completion-System.html#Completion-System https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org https://mads-hartmann.com/2017/08/06/writing-zsh-completion-scripts.html#the-use-of-_arguments
Is Zsh support in the scope of this project?