Aharpo.335 net.general utcsrgv!utzoo!decvax!duke!chico!harpo!jea Fri Feb 19 12:08:07 1982 csh prompt In reference to an item jgy sent some time back regarding a Berkley csh prompt that indicates levels of csh nesting; I have made some simple changes that I feel improve the beauty if not the usefulness of the command. Thanks also to mpt, my co-author. The result gives prompts of the following form: 1: command 2: csh <1> 1: csh <2> 1: csh <3> 1: csh <4> 1: ^D <3> 2: ^D <2> 2: li <2> 3: etc. (where the number in ""s is the nesting level). In .login enter the following lines: _______________________________________________________ # Makes initial prompt be the current command number set prompt = '\!: ' # Identifies first login setenv LOGGEDON yes # Counts the levels of CSH nesting setenv CSHno "0" In .cshrc add these lines: _______________________________________________________ # Give a prompt of the form: <#> %: where # is the nested depth # of the current shell and % is the current command number if ( `printenv LOGGEDON` == "yes" ) then setenv CSHno "`expr $CSHno + 1`" set prompt = "<$CSHNO> \!: " endif ----------------------------------------------------------------- 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.