Just added it to the bottom of your ~/.bashrc
file then you will be able to use cmit
like a regular command, you will need to refresh your current shell to pick up the changes so run source ~/.bashrc
. If you have the function saved in a file cmit
just do cat cmit >> ~/.bashrc
to append the function to the end of your ~/.bashrc
.
You could try out a test function first:
# add to ~/.bashrc first
function test() {
echo "Some test foo!"
}
$ source ~/.bashrc
$ test
Some test foo!