Merge pull request #951 from invsblduck/master

more robust checking for bash completion