I'm trying to create a function in .bashrc
to shortcut my MAMP commands. I want to do something like this:
mamp config
- Opens up MAMP's
httpd.conf
file for editing.
mamp restart
- Restarts the MAMP server.
I created a function in .bashrc
called mamp()
:
function mamp {
if [$1 == "config"]; then
nano /Applications/MAMP/conf/apache/httpd.conf
fi
if [$1 == "restart"]; then
/Applications/MAMP/Library/bin/apachectl restart
fi
}
But that doesn't seem to work.
I get this error -bash: [config: command not found