Solved

Change command prompt for csh

Posted on 2010-11-09
3
1,240 Views
Last Modified: 2012-05-10
I'm attempting to set the user enviroment that will allow the user to see the current working directory while working in a terminal window.  When I do the following in the users .cshrc file I only get the current working directory but the command prompt doesn't change when I change directories.

set prompt="`hostname` {`pwd`}% "

Your assistance is appreciated
0
Comment
Question by:infamous
  • 2
3 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 250 total points
ID: 34096748
Hi,

in csh you must use an alias.
You could put this into your .cshrc file:

alias myprompt 'set prompt="`hostname` {`` pwd`}% "'
# set the prompt initially
            myprompt
            alias cd 'chdir \!* && myprompt'

wmp

0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 250 total points
ID: 34096803
Sorry, copy and paste error. Wrong extra backtick!

alias myprompt 'set prompt="`hostname` {`pwd`}% "'
...
0
 

Author Comment

by:infamous
ID: 34096831
Thanks for the quick response.  I will try this in the morning because I'm off to a meeting.  I will post back in the morning.  If I'm able to get back to the office I will respond tonight.  Thanks Again
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now