[comp.unix.i386] Changing the prompt in C shell

greg@ncelvax.UUCP ("The Engineer") (03/16/90)

I am currently building a 386 box with SCO UNIX and I want to
make the C Shell interface as similar to our VAX with BSD 4.3 to
save on user retraining.

My only real problem so far is in the prompt.

On our VAX we use a line like;

	set prompt="$cwd:t > "

to set the prompt to the current working directory ie: in my
home directory

	greg >

All the documentation from SCO on the C Shell that refers to
the prompt implies that it should do things like that, but the
only example they give is

	set prompt=\!%\

which sets the prompt to the current event but they give no
other options or examples.  

Does anybody have any suggestions or pointers to 3rd party
literature to help me with this?

Thanks in advance.

Greg

-- 
 greg@ncelvax.uucp ___             Greg Ramsey                    
         _n_n_n____i_i ________    Naval Civil Engineering Lab
        (____________I I______I    Code L54                805/
        /ooOOOO OOOOoo  oo oooo    Port Hueneme, CA 93043  982-9720

jackv@turnkey.TCC.COM (Jack F. Vogel) (03/16/90)

In article <637@ncelvax.UUCP> greg@ncelvax.UUCP ("The Engineer") writes:
[ wants to set his SCO csh prompt like the VAX....]
>On our VAX we use a line like;
>
>	set prompt="$cwd:t > "
 
Uh, is there something I am missing here? Why don't you just copy the
.cshrc that you use on the VAX over to your SCO system?? Or is it still
the case that SCO provides a lobotomized csh and it doesn't work with
that .cshrc? I know the Xenix csh didn't even have directory stack 
handling, but don't know if they fixed it in their Unix.

Disclaimer: I speak for myself, not for LCC.


-- 
Jack F. Vogel			jackv@seas.ucla.edu
AIX Technical Support	              - or -
Locus Computing Corp.		jackv@ifs.umich.edu

epate@unf7.UUCP (Ed Pate) (03/26/90)

The prompt characters in standard Sys V are controlled by the shell variables 
PS1 and PS2.  By placing them in  your .profile file, you may set them at login or you may set them at anytime from the shell.

.profile:

          PS1='abcd >'
          PS1=$LOGNAME 

or any other thing you would care to do with a shell variable.  You must remember to export the variable or it won't show the change.

PS1 is the standard prompt and PS2 is the secondary prompt (for when you didn;t enter all the required parameters and the program is asking for the rest)

jeff@samna.UUCP (jeff) (03/28/90)

In article <254@unf7.UUCP> epate@unf7.UUCP (Ed Pate) writes:
>The prompt characters in standard Sys V are controlled by the shell variables 
>PS1 and PS2.
>PS1 is the standard prompt and PS2 is the secondary prompt (for when
>you didn;t enter all the required parameters and the program is
>asking for the rest)

I didn't see the original article, but the answers here don't match
the subject.  The information given above is applicable to the Bourne
shell NOT the C shell (I don't really know anything about ksh, so I
don't know whether it applies there or not).

The C shell uses:

set prompt="<Your prompt here>"

If you want it to be active for all instances of the C shell, the
set statement should go in $HOME/.cshrc

Jeff