I've reproduced the issue --- .bashrc --- PS1="\h:($TTY) \! : " alias !='fc -e -' --- end --- If I comment out the alias, I don't the error. If I set the alias outside the .bashrc, like on the command line, I don't get the error either. It looks like PS1 is being evaluated during <tab> completion.