Open JakeElder opened 3 years ago
This is very interesting @JakeElder , such a good idea!
Wonder if we can make it work for multiple parameters too..
I've seen a lot of people want to bypass the pet parameter filler for speed purposes as well as shell autocomplete. Maybe that's the problem and we can make the pet parameter filler faster and supporting autocomplete somehow? Would be hard though.
I think it's nice to be able to support your functionality optionally though.
We can use the
pet-select
function to use the current line as a search string, IEIt would be useful to be able to select the first match automatically, bypassing the fuzzy finder. Something like
This would invoke exec for the first match for the provided string, (IE for if you have a snippet with the description of "Check SSL Certificate Expiry Date"
Then we could make a function like this;
which would enable entering
then pressing
<ctrl-e>
to have it expanded to the Check SSL Certificate commandCombine this with https://github.com/knqyf263/pet/issues/163 to have a much lighter workflow, IE, I'd like to be able to enter
then press
<ctrl-e>
to expand toand be able to type my commit message, without going through the interactive fuzzy find step and entering parameters via the pet form, while still retaining that great functionality when needed for more obscure snippets that have more than one parameter