Skip to content
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

Custom Completions in Go #4443

Open
darthShadow opened this issue Jul 17, 2020 · 2 comments
Open

Custom Completions in Go #4443

darthShadow opened this issue Jul 17, 2020 · 2 comments

Comments

@darthShadow
Copy link
Member

What is your current rclone version (output from rclone version)?

N/A

What problem are you are trying to solve?

Custom Completions defined in Go to make it work for both Bash & Zsh (and any other shells supported by cobra).

How do you think rclone should be changed to solve that?

Cobra has recently added support for custom completions in go instead of directly in bash or zsh and these completions are automatically translated for all the shells supported. Once we have migrated the custom completion from bash to go, then zsh remote completions should also start working.

References:
spf13/cobra#1035 - Custom Completions in Go - Included in 1.0.0
spf13/cobra#1070 - ZSH Support for the above - Included in the latest master branch
spf13/cobra#107

@ncw ncw added this to the Help Wanted milestone Jul 17, 2020
@ncw
Copy link
Member

ncw commented Jul 17, 2020

That is very neat - well spotted - and would certainly be easier for to maintain with the completions in Go.

I found the docs here: https://github.com/spf13/cobra/blob/master/shell_completions.md

@sgtpep did the original bash completion script for which I am truly grateful as I'm a mediocre bash programmer at best!

Do you want to work on this @darthShadow ? Or maybe @sgtpep ?

@darthShadow
Copy link
Member Author

darthShadow commented Jul 17, 2020

I have almost zero knowledge about writing/reading bash or zsh functions so hopefully, @sgtpep or someone else with more experience in that aspect can do the conversion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants