1748209 Members
2845 Online
108759 Solutions
New Discussion юеВ

Re: Prompt in csh

 
SOLVED
Go to solution
Jose Luis
Advisor

Prompt in csh

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

Re: Prompt in csh

hi jose

try this

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

bye
Christopher McCray_1
Honored Contributor

Re: Prompt in csh

hello,

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

hope this helps

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

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
Francois Bariselle_3
Regular Advisor

Re: Prompt in csh

Edit your syscshrc file and modify le prompt line :

set prompt="$LOGNAME'pwd'"

Frank
Fais la ...
Christopher McCray_1
Honored Contributor

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!!!!
Jose Luis
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