Instead of writing `}; # if', write just `}' as was discussed here: http://www.mail-archive.com/bash-completion-devel@lists.alioth.debian.org/msg01815.html
Added .swp (vim backup) files to .gitignore