Skip to content

Autocomplete usernames #5

@jonallured

Description

@jonallured

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions