-
Notifications
You must be signed in to change notification settings - Fork 4
Description
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.