The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers > Answers to Frequently Asked Questions
.
google unix.com



Answers to Frequently Asked Questions FAQ for UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Help setting PS1 prompt to include current time m223464 Shell Programming and Scripting 4 02-03-2009 09:08 PM
Help-prompt for path and take this as input in find command bsandeep_80 UNIX for Advanced & Expert Users 7 01-21-2009 04:49 PM
Getting current work directory in Command Prompt MeganP UNIX for Dummies Questions & Answers 3 07-20-2007 01:49 PM
Path in prompt line? Leitwolf UNIX for Dummies Questions & Answers 4 04-02-2007 03:25 PM
current directory as part of the csh prompt jamesloh Shell Programming and Scripting 3 08-28-2002 01:38 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-10-2006
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,190
Setting the current path in the command prompt in (t)csh

csh does not deal with prompts in the same way as a bourne based shell.

There are two way to set this in a csh/tcsh shell.

in csh you would have to do something like this in your .cshrc
Code:
alias precommand 'set prompt="${cwd} >"'
precommand           # to set the initial prompt
alias cd 'chdir \!* && precommand'
gives the following prompt:
Code:
/var/tmp/templog >
In tcsh you could do the same or add %/ to the prompt options, for example:
Code:
set prompt="%m{%n} %/ >"
displays as:
Code:
myhost{reborg} /var/tmp/templog >

Last edited by reborg; 11-26-2006 at 05:17 PM..
Sponsored Links
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 10:06 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0