I found a Bash script snippet earlier with which to echo a string to stderr:echoerr() { echo $@ 1>&2; }echoerr hello worldThis remained in my clipboard, and when I wanted to edit a file (with VIM) I accidentally pasted this snippet again instead of the file name:vim echoerr() { echo $@ 1>&2; }echoerr hello worldIt seems to have re-assigned echoerr to vim:$ where vimvim () {    echo $@ 1>&2;}/usr/bin/vimAlso, attempting to open a file with VIM now just echos the file name back:vim path/to/some-filePrints:path/to/some-fileWhat happened? (I'm running zsh inside tmux)
Command re-assigned
zsh;function
Because zsh allows you to define function with multiple names. From man zshmisc:function word ... [ () ] [ term ] { list }       word ... () [ term ] { list }       word ... () [ term ] command              where term is one or more newline or ;.  Define a function which              is referenced by any one of word.  Normally, only  one  word  is              provided;  multiple  words  are  usually only useful for setting              traps.  The body of the function is the list between the  {  and              }.  See the section `Functions'.