When I configure a function in .zshrc, it is printed to the console one time when I source .zshrc (or open a new console window).


function test { echo 'Hellow World'; }
export -f test

console output:

>> source .zshrc
test () { echo 'Hello World'; }

I want to disable this but I couldn't find anywhere how to do it.

closed as off-topic by Gilles, Jeff Schaller, Stephen Rauch, Scott, Satō Katsura Sep 1 '17 at 4:09

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Gilles, Jeff Schaller, Stephen Rauch, Scott, Satō Katsura
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Do you need the export statement there? – datUser Aug 31 '17 at 12:19
  • I cannot reproduce that, I get: invalid option(s) when I try to do export -f test. If you get output that you are not interested in, you can always pipe it to /dev/null. – pfnuesel Aug 31 '17 at 13:06
  • Why are you trying to export the function? In ZSH 5.4.1 that gives invalid option(s) and the docs for typeset by way of export indicate that your flags are indeed an illegal combination. – thrig Aug 31 '17 at 14:01
  • My mistake... I copied the function definition (+export) from the internet without understanding what it does. I thought it was necessary in order to have the function available in the shell. Removing the export line solves my problem. Thank you all! – Nini Michaels Aug 31 '17 at 14:27