fix command completion detect for lua 5.1