I'm tired of typing manage.py startserver 10.211.55.4:4000
, so decided to make an alias for that. Only thing is: the port sometime changes. So I did this in bash profile:
function runserver() {
python manage.py runserver 10.211.55.4:$1
}
But then when I call it: runserver 3000
, it starts it, but immediately stops saying:
"Error: That IP address can't be assigned-to". However if I type the same thing right into command line it works with no complains.
bash --login
all the time? Function definitions should be in.bashrc
, not.bash_profile
, since.bash_profile
is only read by login shells.