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

Shell completions #44

Open
ulken opened this issue Nov 23, 2020 · 3 comments · May be fixed by #45
Open

Shell completions #44

ulken opened this issue Nov 23, 2020 · 3 comments · May be fixed by #45

Comments

@ulken
Copy link
Contributor

ulken commented Nov 23, 2020

This is potentially quite cumbersome, but would be nice with shell (bash/zsh/fish) completions populated with matching entries from the database 🙂.

Thoughts? Do you have any experience with generating necessary data in Python? Feasible or not?

@ulken
Copy link
Contributor Author

ulken commented Nov 23, 2020

I'm gonna give this a go, using argcomplete. I like shtab's philosophy better, but doesn't seem to support dynamic completions which would be required here.

No pressure on merging if you disapprove. If it works reasonably well, I'll just maintain my own fork.

@Evidlo
Copy link
Owner

Evidlo commented Nov 24, 2020

I thought about this a long time ago (#2), but passhole didn't have database caching at the time so it would have required entering your password for each completion.

Take a shot at it. I imagine you want entry/group completion for mv/ls/show/edit/rm?

@ulken
Copy link
Contributor Author

ulken commented Nov 24, 2020

Makes sense. Even now, we still need to login once before completions can work. I'm thinking about adding a login command. I don't think we can prompt for password when tab-completing*. And it feels weird to run an arbitrary command just to cache the db. How do you feel about that?

Take a shot at it. I imagine you want entry/group completion for mv/ls/show/edit/rm?

Yeah, basically all commands taking a path as argument.

* Although, we can warn about login being required for completions to work.

@ulken ulken linked a pull request Nov 30, 2020 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants