Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!maverick.ksu.ksu.edu!hoss!fergvax!252u3129 From: 252u3129@fergvax.unl.edu (Mike Gleason) Newsgroups: comp.unix.questions Subject: Ctrl chars in unix strings Message-ID: <1990Sep23.005533.27493@hoss.unl.edu> Date: 23 Sep 90 00:55:33 GMT Sender: news@hoss.unl.edu (Network News Administer) Distribution: usa Organization: Comp Sci and Engr, Univ. of Nebr. Lines: 24 How can one imbed control characters in a unix string? Specifically, I'd like to have my prompt be in boldface. To do that, I need to insert an ESC char, which I am pretty sure equals a ctrl-[. I know it could be done, because I can write a small C program to do it. Actually, my .signature file has my name in boldface, but I discovered a few minutes ago that something strips out the control chars, and that's why it will look goofy below. I've tried things like: set prompt=" ^[[1m prompt ^[[0m " (ESC 1 m turns bolding on, ESC 0 m turns it off) And I've also tried throwing backslashes to see if unix will take the next char literally, but that usually doesn't work or reports that its missing a a right ]. e.g. set prompt=" \^[\[1m (etc ". I've also tried substituting double quotes with single quotes. If any unix.wizards out there can help, I'd appreciate an email! _____________________________________________________________________________ * [1m Mike Gleason [0m 252u3129@fergvax.unl.edu * "Don't you f*ckin' look at me!" -- D. Hopper cosc006@unlcdc2.unl.edu