Re: Prompt in csh (336 Views)
Reply
Advisor
Jose Luis
Posts: 46
Registered: ‎07-15-2001
Message 1 of 7 (336 Views)
Accepted Solution

Prompt in csh

[ Edited ]

How can I do for set my prompt in csh (UNIX), for what it's change every time when the "cd" command will be executed?

Example:
[hostname:/]# cd /etc
[hostname:/etc]#

Thank's in advance!!!

 

 

 

 P.S.This thread has been moved from HP-UX>System Administration to HP-UX > languages-HP Forums Moderator

The UNIX world is the tenth planet in the solar system
Respected Contributor
Domenico_5
Posts: 268
Registered: ‎03-03-2002
Message 2 of 7 (336 Views)

Re: Prompt in csh

hi jose

try this

alias cd 'cd \!*;set prompt="[`hostname`]$cwd :"

bye
Honored Contributor
Christopher McCray_1
Posts: 1,004
Registered: ‎06-07-2001
Message 3 of 7 (336 Views)

Re: Prompt in csh

hello,

set prompt="[`hostname`:\$PWD]#"

hope this helps

Chris
It wasn't me!!!!
Respected Contributor
Domenico_5
Posts: 268
Registered: ‎03-03-2002
Message 4 of 7 (336 Views)

Re: Prompt in csh

sorry jose

i have made a mistake!!!! the correct is:

alias cd 'cd \!*;set prompt="[`hostname`]$cwd :"'

whit this ' to the end.

bye bye
Regular Advisor
Francois Bariselle_3
Posts: 169
Registered: ‎11-20-2001
Message 5 of 7 (336 Views)

Re: Prompt in csh

Edit your syscshrc file and modify le prompt line :

set prompt="$LOGNAME'pwd'"

Frank
Fais la ...
Honored Contributor
Christopher McCray_1
Posts: 1,004
Registered: ‎06-07-2001
Message 6 of 7 (336 Views)

Re: Prompt in csh

hello,

Sorry, I have my sh and ksh mixed up with my csh.

Change my $PWD to $cwd as Dominico has stated

Sorry again

Chris
It wasn't me!!!!
Advisor
Jose Luis
Posts: 46
Registered: ‎07-15-2001
Message 7 of 7 (336 Views)

Re: Prompt in csh

Thank's to everybody for your help, specially to Domenico. Your answer was the solution for my problem.
Bye.
The UNIX world is the tenth planet in the solar system
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.