Control open -f temporary file name
What technically happens here is the following:


f tells open to read input from standard input and open the results in the default text editor
Because most text editors can't read the content to be edited from standard input, open creates a temporary file with the input it receives from standard input and then opens the default text editor on this file. 
According to man open there is no option to set a custom name for that file


As a workaround you can use

echo 'hello world' &gt; /tmp/foo.txt &amp;&amp; open /tmp/foo.txt


which technically does exactly the same thing.