Apsuvax.1048 net.games.trivia utzoo!decvax!harpo!eagle!mhtsa!allegra!psuvax!sibley Thu May 6 19:54:02 1982 csh problems Here's a good question about csh. Suppose you want to set your prompt to something like 'you found a cshell' instead of the mundane '% '. You decide this is a pretty long prompt so you want the text followed by a newline and 2 spaces. 1. How do you do this directly? 2. How do you write an alias to do it? (A script won't work. Why?) 3. Suppose you have a file full of interesting prompt lines. You also have an executable file 'newprompt' which picks one of them at random and writes it to stdout. Find an alias that invokes 'newprompt' and sets your prompt to the resulting line followed, as above, by a newline and 2 spaces. 4. Explain why your answers work, preferably with references to the Berkeley manuals. (I am mostly interested in how the quotes and/or escapes you use work and why they are necessary.) The difficulty, of course, is getting the newline into the prompt. It can be done. I have some messy solutions, but I hope they aren't the best. Unfortunately, I don't have a good answer to part 4. Maybe someone out there knows how csh really works. Anyway, part 4 is not really fair, since the manuals do not explain the relevant mechanisms well, as far as I can discover. Answers mailed to me will be summarized on the net if there is enough interest. dave psuvax!sibley ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.