fix bash completion logic