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

Autocomplete usernames #5

Open
jonallured opened this issue Feb 14, 2019 · 0 comments
Open

Autocomplete usernames #5

jonallured opened this issue Feb 14, 2019 · 0 comments

Comments

@jonallured
Copy link
Owner

I spent some time tonight researching and tinkering with what it might take to get auto completion of usernames. I ended up tinkering with this line:

$ bat ~/.pear-data | sed -n 's/.*"username": "\([^"]*\)"/\1/p' | sort -u

After looking at how it's done here:

https://github.com/hashrocket/dotmatrix/blob/master/.zsh/functions/_pear#L6

But I also found a couple other interesting links:

https://mads-hartmann.com/2017/08/06/writing-zsh-completion-scripts.html
http://zsh.sourceforge.net/Doc/Release/Completion-System.html
https://spin.atomicobject.com/2016/02/14/bash-programmable-completion/
https://github.com/oclif/plugin-autocomplete/blob/master/src/commands/autocomplete/script.ts

I think it's possible that the oclif plugin can help me get command completion working for pear, but I don't think it's going to help much with username auto complete, which is the thing I want the most.

I guess where I'm at with this is that I'd like to attempt to get this working locally with nothing more than a script in the right $fpath folder and then I can work backwards to figure out how to share that with others.

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

1 participant