My bash function runs only once per terminal opened

view story

http://askubuntu.com – When I try to run my bash function, defined in .bashrc, for a second time in the same terminal, it doesn't work. The code is the following: function nos (){ local option while getopts cs option do case $option in s) #start my server ;; c) local cdir="~/mydirectory" local cdir_arg="" case $OPTARG in p) local cdir_arg="anotherdirectory" ;; (HowTos)