I'm trying to change code , to code . in bash, but I am getting a bunch of errors. This should work.
code() {
  if [[ $1 == ,]];
  then
    code .
  else
    code $1
  fi
  return 1
}
It gives me parse error because of the semi colon
if I take the semi colon out, it gives me condition expected: $1
if I add quotes to the , and add the semi colon back in, if i get  parse error near `;'
if I keep the quotes and remove the semi colon I get condition expected: $1
if I remove the semi colon and escape the , it literally just closes the terminal window.
what is going on here? all the documentaion online syas this should work.
 
    