I have a registered function in ZSH that searches file contents under the current path for a match and then captures the resulting filename. This is then bound to a key combination. The keybinding, search and result all work fine (as in they return the desired value).
When I am using the keybinding, the value is printed out to the current shell line but it is not recognised as actual input (i.e. if I hit enter the value is considered empty and nothing is added to the prompt history). How do I output the result as if it were typed and a valid value. I have have attempted
echo
/print
/printf
(assuming the outcome would be the same for each) but also appending to BUFFER
and setting CURSOR
.
I'm sure this is well documented and I'm failing to find examples because of the lack of correct terminology. Can anyone point me in the right direction?
Asked by dajoto
(113 rep)
Oct 3, 2024, 10:20 AM
Last activity: Oct 3, 2024, 11:59 AM
Last activity: Oct 3, 2024, 11:59 AM