Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Change command prompt for csh

Posted on 2010-11-09
3
Medium Priority
?
1,303 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 1000 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 1000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

604 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