completion, bash prompt: move __gitdir() tests to completion test suite