Showing results for 
Search instead for 
Do you mean 

Prompt in csh

SOLVED
Go to Solution
Highlighted
Advisor

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
6 REPLIES
Respected Contributor

Re: Prompt in csh

hi jose

try this

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

bye
Honored Contributor [Founder]

Re: Prompt in csh

hello,

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

hope this helps

Chris
It wasn't me!!!!
Respected Contributor

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 [Founder]

Re: Prompt in csh

Edit your syscshrc file and modify le prompt line :

set prompt="$LOGNAME'pwd'"

Frank
Fais la ...
Honored Contributor [Founder]

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

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