Adding a custom function to .zprofile

Of course, as soon as I submit the question I found the answer in