[rancid] Re: plus in the prompt?

Ed Ravin eravin at panix.com
Wed Mar 12 21:43:05 UTC 2008


On Wed, Mar 12, 2008 at 11:27:06AM -0400, Ed Ravin wrote:
> On Tue, Mar 11, 2008 at 08:57:18AM -0700, David Luyer wrote:
> > 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
> 

And I also needed to change the corresponding code in rancid:

-           $prompt =~ s/([][}{)(\\])/\\$1/g;
+           $prompt =~ s/([][+.*}{)(\\])/\\$1/g;



More information about the Rancid-discuss mailing list