Rename a function and a command, and filter escape characters