If you really need such characters in your prompt, this: > # escape any parens in the prompt, such as "(enable)" > regsub -all {[)(]} $prompt {\\&} reprompt could be changed to something more like: # escape all regexp magic characters in the prompt regsub -all {[+*.|(){}[\]]} $prompt {\\&} reprompt David.