Searching for partial words is already supported if you use the asterisk character * e.g. cu* will find cup, cups etc.
Would that be sufficient for your needs?
Well quick & dirty would be to add it to the search form element directly on its onsubmit attribute as so
That should be on both search forms - the one in sidebar and search page.
Ideally though it would be much more neatly tucked away in the theme's theme.js.liquid.
Hope this helps!