Solved

Change command prompt for csh

Posted on 2010-11-09
3
1,275 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

749 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