How to restore function using PG_RESTORE
The parenthesis is special to the shell.  You don't have to remove it, you have to quote/escape it to get it to pass through the shell.

pg_restore -d postgres --function='addconfiguration2(text)' -v /tmp/dump