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

Install completion to $ZDOTDIR/.zshrc #271

Closed
jakkdl opened this issue Nov 22, 2022 · 4 comments
Closed

Install completion to $ZDOTDIR/.zshrc #271

jakkdl opened this issue Nov 22, 2022 · 4 comments

Comments

@jakkdl
Copy link

jakkdl commented Nov 22, 2022

very minor, but completions are installed to ~/.zshrc instead of $ZDOTDIR/.zshrc where my .zshrc actually lives.

@AuHau
Copy link
Owner

AuHau commented Nov 22, 2022

Thanks for reporting, although this behavior comes from upstream dependency: https://github.com/click-contrib/click-completion

That said not even sure if that is the suggested method how to implement completions anymore as Click 8.x now ships its own mechanism for completions, but I don't have time to really investigate nor migrate to this new mechanism. If you would like to take a bite at it, then feel free!

@jakkdl
Copy link
Author

jakkdl commented Nov 22, 2022

ye not sure it even works for me at all. I might look at it if I find some free time :)

@StanczakDominik
Copy link
Collaborator

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.

@StanczakDominik
Copy link
Collaborator

We should probably close this in favor of #214, actually. Since this way of providing completion is outdated, it doesn't help much to keep relying on click_completion in perpetuity. 🙁

@StanczakDominik StanczakDominik closed this as not planned Won't fix, can't repro, duplicate, stale Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants