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

Rework CLI completion with new Click 8.0 release #214

Open
AuHau opened this issue Sep 6, 2021 · 1 comment
Open

Rework CLI completion with new Click 8.0 release #214

AuHau opened this issue Sep 6, 2021 · 1 comment

Comments

@AuHau
Copy link
Owner

AuHau commented Sep 6, 2021

The new Click 8.0 release has rewritten the tab completion system and now for one includes native support and for two it has more capabilities which for example could be used to complete name of entities in flags like --project etc.

I don't have time at the moment to work on this, but if anybody would be interested PR would be welcomed!

@StanczakDominik
Copy link
Collaborator

Crossposting from #271 (comment)_

So as I understand the relevant bit of Click's docs, they only generate the file now, they don't really provide any support for shell config file modification. Which I guess makes a lot of sense, honestly.

I guess we could easily migrate to the new way of doing things by dropping the toggl config completion feature and instead adding the following to the docs, here for zsh:

Save the script somewhere.

_FOO_BAR_COMPLETE=zsh_source toggl > ~/.toggl-complete.zsh

Source the file in ~/.zshrc.

. ~/.toggl-complete.zsh

I wonder whether there's a simple way to keep the config completion functionality.

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

2 participants