I am trying to make a alias for mv so it does its normal behavioer in normal folders and is replaced by git mv inside git repositories. I tried many ways. the if statement works, only the command git mv will not run correctly.alias mv='$(if [ x`git rev-parse --show-toplevel 2> /dev/null` = x ];     echo mv;  else     echo git mv; fi)'
if-then-else inside Bash Alias
bash;git;alias
I would use a function for that, like so:gitmv(){    if [ x`git rev-parse --show-toplevel 2> /dev/null` = x ];         mv $@      else         git mv $@     fi}Edit:alias mv=gitmv